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/ps.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/ps.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/ps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c index 5ae26647f340..13ad33e85577 100644 --- a/drivers/net/wireless/rtlwifi/ps.c +++ b/drivers/net/wireless/rtlwifi/ps.c | |||
@@ -333,10 +333,10 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) | |||
333 | rpwm_val = 0x0C; /* RF on */ | 333 | rpwm_val = 0x0C; /* RF on */ |
334 | fw_pwrmode = FW_PS_ACTIVE_MODE; | 334 | fw_pwrmode = FW_PS_ACTIVE_MODE; |
335 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SET_RPWM, | 335 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SET_RPWM, |
336 | (u8 *) (&rpwm_val)); | 336 | &rpwm_val); |
337 | rtlpriv->cfg->ops->set_hw_reg(hw, | 337 | rtlpriv->cfg->ops->set_hw_reg(hw, |
338 | HW_VAR_H2C_FW_PWRMODE, | 338 | HW_VAR_H2C_FW_PWRMODE, |
339 | (u8 *) (&fw_pwrmode)); | 339 | &fw_pwrmode); |
340 | fw_current_inps = false; | 340 | fw_current_inps = false; |
341 | 341 | ||
342 | rtlpriv->cfg->ops->set_hw_reg(hw, | 342 | rtlpriv->cfg->ops->set_hw_reg(hw, |
@@ -356,11 +356,11 @@ static void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) | |||
356 | (u8 *) (&fw_current_inps)); | 356 | (u8 *) (&fw_current_inps)); |
357 | rtlpriv->cfg->ops->set_hw_reg(hw, | 357 | rtlpriv->cfg->ops->set_hw_reg(hw, |
358 | HW_VAR_H2C_FW_PWRMODE, | 358 | HW_VAR_H2C_FW_PWRMODE, |
359 | (u8 *) (&ppsc->fwctrl_psmode)); | 359 | &ppsc->fwctrl_psmode); |
360 | 360 | ||
361 | rtlpriv->cfg->ops->set_hw_reg(hw, | 361 | rtlpriv->cfg->ops->set_hw_reg(hw, |
362 | HW_VAR_SET_RPWM, | 362 | HW_VAR_SET_RPWM, |
363 | (u8 *) (&rpwm_val)); | 363 | &rpwm_val); |
364 | } else { | 364 | } else { |
365 | /* Reset the power save related parameters. */ | 365 | /* Reset the power save related parameters. */ |
366 | ppsc->dot11_psmode = EACTIVE; | 366 | ppsc->dot11_psmode = EACTIVE; |
@@ -446,7 +446,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) | |||
446 | { | 446 | { |
447 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 447 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
448 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 448 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
449 | struct ieee80211_hdr *hdr = (void *) data; | 449 | struct ieee80211_hdr *hdr = data; |
450 | struct ieee80211_tim_ie *tim_ie; | 450 | struct ieee80211_tim_ie *tim_ie; |
451 | u8 *tim; | 451 | u8 *tim; |
452 | u8 tim_len; | 452 | u8 tim_len; |