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/rtl8192ce/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/rtl8192ce/trx.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 3af874e69595..52166640f167 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -605,7 +605,7 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw, | |||
605 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 605 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
606 | bool defaultadapter = true; | 606 | bool defaultadapter = true; |
607 | struct ieee80211_sta *sta; | 607 | struct ieee80211_sta *sta; |
608 | u8 *pdesc = (u8 *) pdesc_tx; | 608 | u8 *pdesc = pdesc_tx; |
609 | u16 seq_number; | 609 | u16 seq_number; |
610 | __le16 fc = hdr->frame_control; | 610 | __le16 fc = hdr->frame_control; |
611 | u8 fw_qsel = _rtl92ce_map_hwqueue_to_fwqueue(skb, hw_queue); | 611 | u8 fw_qsel = _rtl92ce_map_hwqueue_to_fwqueue(skb, hw_queue); |
@@ -806,7 +806,7 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
806 | 806 | ||
807 | SET_TX_DESC_OWN(pdesc, 1); | 807 | SET_TX_DESC_OWN(pdesc, 1); |
808 | 808 | ||
809 | SET_TX_DESC_PKT_SIZE((u8 *) pdesc, (u16) (skb->len)); | 809 | SET_TX_DESC_PKT_SIZE(pdesc, (u16) (skb->len)); |
810 | 810 | ||
811 | SET_TX_DESC_FIRST_SEG(pdesc, 1); | 811 | SET_TX_DESC_FIRST_SEG(pdesc, 1); |
812 | SET_TX_DESC_LAST_SEG(pdesc, 1); | 812 | SET_TX_DESC_LAST_SEG(pdesc, 1); |