diff options
author | Joe Perches <joe@perches.com> | 2014-03-24 16:15:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-27 14:20:05 -0400 |
commit | 45d18c562adefe9d807c0ba833affdeff68bad98 (patch) | |
tree | c07cbb073aa99f61465c1116c9f627d6b3071a5a /drivers/net | |
parent | 8986992de4225871d171e8bdd82abd0eeab978ff (diff) |
mwifiex: Remove casts of pointer to same type
Casting a pointer to a pointer of the same type is pointless,
so remove these unnecessary casts.
Done via coccinelle script:
$ cat typecast_2.cocci
@@
type T;
T *foo;
@@
- (T *)foo
+ foo
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/tdls.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 57c353a94b29..7614a42f9c36 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -1033,7 +1033,7 @@ static int mwifiex_pcie_send_data_complete(struct mwifiex_adapter *adapter) | |||
1033 | card->tx_buf_list[wrdoneidx] = NULL; | 1033 | card->tx_buf_list[wrdoneidx] = NULL; |
1034 | 1034 | ||
1035 | if (reg->pfu_enabled) { | 1035 | if (reg->pfu_enabled) { |
1036 | desc2 = (void *)card->txbd_ring[wrdoneidx]; | 1036 | desc2 = card->txbd_ring[wrdoneidx]; |
1037 | memset(desc2, 0, sizeof(*desc2)); | 1037 | memset(desc2, 0, sizeof(*desc2)); |
1038 | } else { | 1038 | } else { |
1039 | desc = card->txbd_ring[wrdoneidx]; | 1039 | desc = card->txbd_ring[wrdoneidx]; |
@@ -1118,7 +1118,7 @@ mwifiex_pcie_send_data(struct mwifiex_adapter *adapter, struct sk_buff *skb, | |||
1118 | card->tx_buf_list[wrindx] = skb; | 1118 | card->tx_buf_list[wrindx] = skb; |
1119 | 1119 | ||
1120 | if (reg->pfu_enabled) { | 1120 | if (reg->pfu_enabled) { |
1121 | desc2 = (void *)card->txbd_ring[wrindx]; | 1121 | desc2 = card->txbd_ring[wrindx]; |
1122 | desc2->paddr = buf_pa; | 1122 | desc2->paddr = buf_pa; |
1123 | desc2->len = (u16)skb->len; | 1123 | desc2->len = (u16)skb->len; |
1124 | desc2->frag_len = (u16)skb->len; | 1124 | desc2->frag_len = (u16)skb->len; |
@@ -1278,7 +1278,7 @@ static int mwifiex_pcie_process_recv_data(struct mwifiex_adapter *adapter) | |||
1278 | card->rx_buf_list[rd_index] = skb_tmp; | 1278 | card->rx_buf_list[rd_index] = skb_tmp; |
1279 | 1279 | ||
1280 | if (reg->pfu_enabled) { | 1280 | if (reg->pfu_enabled) { |
1281 | desc2 = (void *)card->rxbd_ring[rd_index]; | 1281 | desc2 = card->rxbd_ring[rd_index]; |
1282 | desc2->paddr = buf_pa; | 1282 | desc2->paddr = buf_pa; |
1283 | desc2->len = skb_tmp->len; | 1283 | desc2->len = skb_tmp->len; |
1284 | desc2->frag_len = skb_tmp->len; | 1284 | desc2->frag_len = skb_tmp->len; |
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 0e8ca7bab3e7..4e6e75c2de0c 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -1653,7 +1653,7 @@ mwifiex_parse_single_response_buf(struct mwifiex_private *priv, u8 **bss_info, | |||
1653 | curr_bcn_bytes -= ETH_ALEN; | 1653 | curr_bcn_bytes -= ETH_ALEN; |
1654 | 1654 | ||
1655 | if (!ext_scan) { | 1655 | if (!ext_scan) { |
1656 | rssi = (s32) *(u8 *)current_ptr; | 1656 | rssi = (s32) *current_ptr; |
1657 | rssi = (-rssi) * 100; /* Convert dBm to mBm */ | 1657 | rssi = (-rssi) * 100; /* Convert dBm to mBm */ |
1658 | current_ptr += sizeof(u8); | 1658 | current_ptr += sizeof(u8); |
1659 | curr_bcn_bytes -= sizeof(u8); | 1659 | curr_bcn_bytes -= sizeof(u8); |
diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c index 8cec6e4ba8c4..97662a1ba58c 100644 --- a/drivers/net/wireless/mwifiex/tdls.c +++ b/drivers/net/wireless/mwifiex/tdls.c | |||
@@ -730,13 +730,13 @@ void mwifiex_process_tdls_action_frame(struct mwifiex_private *priv, | |||
730 | 730 | ||
731 | if (len < (sizeof(struct ethhdr) + 3)) | 731 | if (len < (sizeof(struct ethhdr) + 3)) |
732 | return; | 732 | return; |
733 | if (*(u8 *)(buf + sizeof(struct ethhdr)) != WLAN_TDLS_SNAP_RFTYPE) | 733 | if (*(buf + sizeof(struct ethhdr)) != WLAN_TDLS_SNAP_RFTYPE) |
734 | return; | 734 | return; |
735 | if (*(u8 *)(buf + sizeof(struct ethhdr) + 1) != WLAN_CATEGORY_TDLS) | 735 | if (*(buf + sizeof(struct ethhdr) + 1) != WLAN_CATEGORY_TDLS) |
736 | return; | 736 | return; |
737 | 737 | ||
738 | peer = buf + ETH_ALEN; | 738 | peer = buf + ETH_ALEN; |
739 | action = *(u8 *)(buf + sizeof(struct ethhdr) + 2); | 739 | action = *(buf + sizeof(struct ethhdr) + 2); |
740 | 740 | ||
741 | /* just handle TDLS setup request/response/confirm */ | 741 | /* just handle TDLS setup request/response/confirm */ |
742 | if (action > WLAN_TDLS_SETUP_CONFIRM) | 742 | if (action > WLAN_TDLS_SETUP_CONFIRM) |