rtlwifi: Remove addressof casts to same type
Using addressof then casting to the original type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast.cocci @@ type T; T foo; @@ - (T *)&foo + &foo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Esse commit está contido em:
@@ -1828,7 +1828,7 @@ static void _rtl88ee_read_adapter_info(struct ieee80211_hw *hw)
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
"EEPROM SMID = 0x%4x\n", rtlefuse->eeprom_smid);
|
||||
/*customer ID*/
|
||||
rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID];
|
||||
rtlefuse->eeprom_oemid = hwinfo[EEPROM_CUSTOMER_ID];
|
||||
if (rtlefuse->eeprom_oemid == 0xFF)
|
||||
rtlefuse->eeprom_oemid = 0;
|
||||
|
||||
@@ -1845,7 +1845,7 @@ static void _rtl88ee_read_adapter_info(struct ieee80211_hw *hw)
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
|
||||
"dev_addr: %pM\n", rtlefuse->dev_addr);
|
||||
/*channel plan */
|
||||
rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN];
|
||||
rtlefuse->eeprom_channelplan = hwinfo[EEPROM_CHANNELPLAN];
|
||||
/* set channel paln to world wide 13 */
|
||||
rtlefuse->channel_plan = COUNTRY_CODE_WORLD_WIDE_13;
|
||||
/*tx power*/
|
||||
@@ -1857,7 +1857,7 @@ static void _rtl88ee_read_adapter_info(struct ieee80211_hw *hw)
|
||||
rtlefuse->autoload_failflag,
|
||||
hwinfo);
|
||||
/*board type*/
|
||||
rtlefuse->board_type = (((*(u8 *)&hwinfo[jj]) & 0xE0) >> 5);
|
||||
rtlefuse->board_type = (hwinfo[jj] & 0xE0) >> 5;
|
||||
/*Wake on wlan*/
|
||||
rtlefuse->wowlan_enable = ((hwinfo[kk] & 0x40) >> 6);
|
||||
/*parse xtal*/
|
||||
@@ -2223,8 +2223,7 @@ void rtl88ee_update_channel_access_setting(struct ieee80211_hw *hw)
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
u16 sifs_timer;
|
||||
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME,
|
||||
(u8 *)&mac->slot_time);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME, &mac->slot_time);
|
||||
if (!mac->ht_enable)
|
||||
sifs_timer = 0x0a0a;
|
||||
else
|
||||
|
Referência em uma nova issue
Block a user