diff options
author | Joe Perches <joe@perches.com> | 2012-06-04 08:44:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-06 12:31:33 -0400 |
commit | 2c208890c6d4e16076c6664137703ec813e8fa6c (patch) | |
tree | dd25049d7fdaf305679acc08f4b36fbcdbdb0213 /drivers/net/wireless/rtlwifi/pci.c | |
parent | 6469933605a3ecdfa66b98160cde98ecd256cb3f (diff) |
wireless: Remove casts to same type
Adding casts of objects to the same type is unnecessary
and confusing for a human reader.
For example, this cast:
int y;
int *p = (int *)&y;
I used the coccinelle script below to find and remove these
unnecessary casts. I manually removed the conversions this
script produces of casts with __force, __iomem and __user.
@@
type T;
T *p;
@@
- (T *)p
+ p
Neatened the mwifiex_deauthenticate_infra function which
was doing odd things with array pointers and not using
is_zero_ether_addr.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 2062ea1d7c80..82d3afcfecd1 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -756,10 +756,10 @@ done: | |||
756 | if (index == rtlpci->rxringcount - 1) | 756 | if (index == rtlpci->rxringcount - 1) |
757 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, | 757 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, |
758 | HW_DESC_RXERO, | 758 | HW_DESC_RXERO, |
759 | (u8 *)&tmp_one); | 759 | &tmp_one); |
760 | 760 | ||
761 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, | 761 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, false, HW_DESC_RXOWN, |
762 | (u8 *)&tmp_one); | 762 | &tmp_one); |
763 | 763 | ||
764 | index = (index + 1) % rtlpci->rxringcount; | 764 | index = (index + 1) % rtlpci->rxringcount; |
765 | } | 765 | } |
@@ -934,7 +934,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw) | |||
934 | __skb_queue_tail(&ring->queue, pskb); | 934 | __skb_queue_tail(&ring->queue, pskb); |
935 | 935 | ||
936 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, true, HW_DESC_OWN, | 936 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, true, HW_DESC_OWN, |
937 | (u8 *)&temp_one); | 937 | &temp_one); |
938 | 938 | ||
939 | return; | 939 | return; |
940 | } | 940 | } |
@@ -1126,11 +1126,11 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) | |||
1126 | rxbuffersize); | 1126 | rxbuffersize); |
1127 | rtlpriv->cfg->ops->set_desc((u8 *) entry, false, | 1127 | rtlpriv->cfg->ops->set_desc((u8 *) entry, false, |
1128 | HW_DESC_RXOWN, | 1128 | HW_DESC_RXOWN, |
1129 | (u8 *)&tmp_one); | 1129 | &tmp_one); |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | rtlpriv->cfg->ops->set_desc((u8 *) entry, false, | 1132 | rtlpriv->cfg->ops->set_desc((u8 *) entry, false, |
1133 | HW_DESC_RXERO, (u8 *)&tmp_one); | 1133 | HW_DESC_RXERO, &tmp_one); |
1134 | } | 1134 | } |
1135 | return 0; | 1135 | return 0; |
1136 | } | 1136 | } |
@@ -1263,7 +1263,7 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) | |||
1263 | rtlpriv->cfg->ops->set_desc((u8 *) entry, | 1263 | rtlpriv->cfg->ops->set_desc((u8 *) entry, |
1264 | false, | 1264 | false, |
1265 | HW_DESC_RXOWN, | 1265 | HW_DESC_RXOWN, |
1266 | (u8 *)&tmp_one); | 1266 | &tmp_one); |
1267 | } | 1267 | } |
1268 | rtlpci->rx_ring[rx_queue_idx].idx = 0; | 1268 | rtlpci->rx_ring[rx_queue_idx].idx = 0; |
1269 | } | 1269 | } |
@@ -1422,7 +1422,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1422 | __skb_queue_tail(&ring->queue, skb); | 1422 | __skb_queue_tail(&ring->queue, skb); |
1423 | 1423 | ||
1424 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, true, | 1424 | rtlpriv->cfg->ops->set_desc((u8 *)pdesc, true, |
1425 | HW_DESC_OWN, (u8 *)&temp_one); | 1425 | HW_DESC_OWN, &temp_one); |
1426 | 1426 | ||
1427 | 1427 | ||
1428 | if ((ring->entries - skb_queue_len(&ring->queue)) < 2 && | 1428 | if ((ring->entries - skb_queue_len(&ring->queue)) < 2 && |