From 6dd19f19a5e2fb78681e5f33431200e2b5aec763 Mon Sep 17 00:00:00 2001 From: Anish Bhatt Date: Sun, 13 Sep 2015 22:00:44 -0700 Subject: staging/rtl8188eu : Remove duplicated BIT() definitions The BIT() macro is already defined in bitops.h, remove duplicate definitions. Users of BIT() macro are expecting unsigned int/u32, so add typecasts where this creates a build warning. Signed-off-by: Anish Bhatt Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 7 +++++-- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 6 ++++-- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 4 ---- drivers/staging/rtl8188eu/include/wifi.h | 7 ------- 4 files changed, 9 insertions(+), 15 deletions(-) (limited to 'drivers/staging/rtl8188eu') diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 5dae7de03327..dd820185110f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -4177,10 +4177,13 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame) RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+mgt_dispatcher: type(0x%x) subtype(0x%x)\n", - GetFrameType(pframe), GetFrameSubType(pframe))); + (unsigned int)GetFrameType(pframe), + (unsigned int)GetFrameSubType(pframe))); if (GetFrameType(pframe) != WIFI_MGT_TYPE) { - RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("mgt_dispatcher: type(0x%x) error!\n", GetFrameType(pframe))); + RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, + ("mgt_dispatcher: type(0x%x) error!\n", + (unsigned int)GetFrameType(pframe))); return; } diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index 077b39a41c60..3bb40a7fe3ce 100644 --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c @@ -1414,13 +1414,15 @@ void update_IOT_info(struct adapter *padapter) pmlmeinfo->turboMode_cts2self = 0; pmlmeinfo->turboMode_rtsen = 1; /* disable high power */ - Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false); + Switch_DM_Func(padapter, (u32)(~DYNAMIC_BB_DYNAMIC_TXPWR), + false); break; case HT_IOT_PEER_REALTEK: /* rtw_write16(padapter, 0x4cc, 0xffff); */ /* rtw_write16(padapter, 0x546, 0x01c0); */ /* disable high power */ - Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false); + Switch_DM_Func(padapter, (u32)(~DYNAMIC_BB_DYNAMIC_TXPWR), + false); break; default: pmlmeinfo->turboMode_cts2self = 0; diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h index 2c33eb30d31b..e99179a794af 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h @@ -19,10 +19,6 @@ #ifndef __RTL8188E_SPEC_H__ #define __RTL8188E_SPEC_H__ -#ifndef BIT -#define BIT(x) (1 << (x)) -#endif - #define BIT0 0x00000001 #define BIT1 0x00000002 #define BIT2 0x00000004 diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index 6e5fa735e800..6cb5beca1672 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h @@ -20,13 +20,6 @@ #ifndef _WIFI_H_ #define _WIFI_H_ - -#ifdef BIT -/* error "BIT define occurred earlier elsewhere!\n" */ -#undef BIT -#endif -#define BIT(x) (1 << (x)) - #define WLAN_IEEE_OUI_LEN 3 #define WLAN_CRC_LEN 4 #define WLAN_BSSID_LEN 6 -- cgit v1.2.3-55-g7522