aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/gdm724x/gdm_lte.c
diff options
context:
space:
mode:
authorShraddha Barke <shraddha.6596@gmail.com>2015-10-15 00:58:20 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-16 22:51:48 -0700
commit2594ca30c0ae7f126fc84dc3a795f007c2b2787f (patch)
tree1bb7f41399a6f132b96096d9f2337077d674f547 /drivers/staging/gdm724x/gdm_lte.c
parentStaging: unisys: Remove unnecessary cast on void pointer (diff)
downloadwireguard-linux-2594ca30c0ae7f126fc84dc3a795f007c2b2787f.tar.xz
wireguard-linux-2594ca30c0ae7f126fc84dc3a795f007c2b2787f.zip
Staging: gdm724x: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types. Semantic patch: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm724x/gdm_lte.c')
-rw-r--r--drivers/staging/gdm724x/gdm_lte.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
index a8d2cffb411c..8a55ec1e5331 100644
--- a/drivers/staging/gdm724x/gdm_lte.c
+++ b/drivers/staging/gdm724x/gdm_lte.c
@@ -377,11 +377,11 @@ static s32 gdm_lte_tx_nic_type(struct net_device *dev, struct sk_buff *skb)
break;
case ETH_P_IP:
nic_type |= NIC_TYPE_F_IPV4;
- ip = (struct iphdr *)network_data;
+ ip = network_data;
/* Check DHCPv4 */
if (ip->protocol == IPPROTO_UDP) {
- struct udphdr *udp = (struct udphdr *)
+ struct udphdr *udp =
(network_data + sizeof(struct iphdr));
if (ntohs(udp->dest) == 67 || ntohs(udp->dest) == 68)
nic_type |= NIC_TYPE_F_DHCP;
@@ -389,15 +389,15 @@ static s32 gdm_lte_tx_nic_type(struct net_device *dev, struct sk_buff *skb)
break;
case ETH_P_IPV6:
nic_type |= NIC_TYPE_F_IPV6;
- ipv6 = (struct ipv6hdr *)network_data;
+ ipv6 = network_data;
if (ipv6->nexthdr == IPPROTO_ICMPV6) /* Check NDP request */ {
- struct icmp6hdr *icmp6 = (struct icmp6hdr *)
+ struct icmp6hdr *icmp6 =
(network_data + sizeof(struct ipv6hdr));
if (icmp6->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION)
nic_type |= NIC_TYPE_ICMPV6;
} else if (ipv6->nexthdr == IPPROTO_UDP) /* Check DHCPv6 */ {
- struct udphdr *udp = (struct udphdr *)
+ struct udphdr *udp =
(network_data + sizeof(struct ipv6hdr));
if (ntohs(udp->dest) == 546 || ntohs(udp->dest) == 547)
nic_type |= NIC_TYPE_F_DHCP;
@@ -814,9 +814,9 @@ static int gdm_lte_receive_pkt(struct phy_dev *phy_dev, char *buf, int len)
static int rx_complete(void *arg, void *data, int len, int context)
{
- struct phy_dev *phy_dev = (struct phy_dev *)arg;
+ struct phy_dev *phy_dev = arg;
- return gdm_lte_receive_pkt(phy_dev, (char *)data, len);
+ return gdm_lte_receive_pkt(phy_dev, data, len);
}
void start_rx_proc(struct phy_dev *phy_dev)