aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/base.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-06-04 12:44:17 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-06 09:31:33 -0700
commit2c208890c6d4e16076c6664137703ec813e8fa6c (patch)
treedd25049d7fdaf305679acc08f4b36fbcdbdb0213 /drivers/net/wireless/rtlwifi/base.c
parentethernet: Remove casts to same type (diff)
downloadlinux-dev-2c208890c6d4e16076c6664137703ec813e8fa6c.tar.xz
linux-dev-2c208890c6d4e16076c6664137703ec813e8fa6c.zip
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/base.c')
-rw-r--r--drivers/net/wireless/rtlwifi/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index f4c852c6749b..58e1f7bb4df1 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -907,7 +907,7 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
struct ieee80211_hdr *hdr = rtl_get_hdr(skb);
struct rtl_priv *rtlpriv = rtl_priv(hw);
__le16 fc = hdr->frame_control;
- u8 *act = (u8 *) (((u8 *) skb->data + MAC80211_3ADDR_LEN));
+ u8 *act = (u8 *)skb->data + MAC80211_3ADDR_LEN;
u8 category;
if (!ieee80211_is_action(fc))