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/rtl8192de/trx.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/rtl8192de/trx.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/trx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c index 1666ef7fd87b..f80690d82c11 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c | |||
@@ -560,7 +560,7 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw, | |||
560 | struct rtl_hal *rtlhal = rtl_hal(rtlpriv); | 560 | struct rtl_hal *rtlhal = rtl_hal(rtlpriv); |
561 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 561 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
562 | struct ieee80211_sta *sta = info->control.sta; | 562 | struct ieee80211_sta *sta = info->control.sta; |
563 | u8 *pdesc = (u8 *) pdesc_tx; | 563 | u8 *pdesc = pdesc_tx; |
564 | u16 seq_number; | 564 | u16 seq_number; |
565 | __le16 fc = hdr->frame_control; | 565 | __le16 fc = hdr->frame_control; |
566 | unsigned int buf_len = 0; | 566 | unsigned int buf_len = 0; |
@@ -761,11 +761,11 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
761 | SET_TX_DESC_QUEUE_SEL(pdesc, fw_queue); | 761 | SET_TX_DESC_QUEUE_SEL(pdesc, fw_queue); |
762 | SET_TX_DESC_FIRST_SEG(pdesc, 1); | 762 | SET_TX_DESC_FIRST_SEG(pdesc, 1); |
763 | SET_TX_DESC_LAST_SEG(pdesc, 1); | 763 | SET_TX_DESC_LAST_SEG(pdesc, 1); |
764 | SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16) (skb->len)); | 764 | SET_TX_DESC_TX_BUFFER_SIZE(pdesc, (u16)skb->len); |
765 | SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, mapping); | 765 | SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc, mapping); |
766 | SET_TX_DESC_RATE_ID(pdesc, 7); | 766 | SET_TX_DESC_RATE_ID(pdesc, 7); |
767 | SET_TX_DESC_MACID(pdesc, 0); | 767 | SET_TX_DESC_MACID(pdesc, 0); |
768 | SET_TX_DESC_PKT_SIZE((u8 *) pdesc, (u16) (skb->len)); | 768 | SET_TX_DESC_PKT_SIZE(pdesc, (u16) (skb->len)); |
769 | SET_TX_DESC_FIRST_SEG(pdesc, 1); | 769 | SET_TX_DESC_FIRST_SEG(pdesc, 1); |
770 | SET_TX_DESC_LAST_SEG(pdesc, 1); | 770 | SET_TX_DESC_LAST_SEG(pdesc, 1); |
771 | SET_TX_DESC_OFFSET(pdesc, 0x20); | 771 | SET_TX_DESC_OFFSET(pdesc, 0x20); |