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>
This commit is contained in:

committed by
John W. Linville

parent
fd6564fcdc
commit
9cb76aa994
@@ -1628,10 +1628,10 @@ static void _rtl8723ae_read_adapter_info(struct ieee80211_hw *hw,
|
||||
rtl8723ae_read_bt_coexist_info_from_hwpg(hw,
|
||||
rtlefuse->autoload_failflag, hwinfo);
|
||||
|
||||
rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN];
|
||||
rtlefuse->eeprom_channelplan = hwinfo[EEPROM_CHANNELPLAN];
|
||||
rtlefuse->eeprom_version = *(u16 *)&hwinfo[EEPROM_VERSION];
|
||||
rtlefuse->txpwr_fromeprom = true;
|
||||
rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID];
|
||||
rtlefuse->eeprom_oemid = hwinfo[EEPROM_CUSTOMER_ID];
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
"EEPROM Customer ID: 0x%2x\n", rtlefuse->eeprom_oemid);
|
||||
@@ -2051,8 +2051,7 @@ void rtl8723ae_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
|
||||
|
Reference in New Issue
Block a user