staging/rtl8188eu : Remove duplicated BIT() definitions
authorAnish Bhatt <anish7@gmail.com>
Mon, 14 Sep 2015 05:00:44 +0000 (22:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2015 15:50:48 +0000 (08:50 -0700)
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 <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
drivers/staging/rtl8188eu/include/rtl8188e_spec.h
drivers/staging/rtl8188eu/include/wifi.h

index 5dae7de03327fed0c328b01379db7b69d891c976..dd820185110f620afa39cdbd174ffe91ac90c577 100644 (file)
@@ -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;
        }
 
index 077b39a41c60a0d0cc32479a7ca51fcfdcc682ca..3bb40a7fe3ce480734bd51646e9be5fbb93ec454 100644 (file)
@@ -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;
index 2c33eb30d31b3d296233514762ac7223c49c3f83..e99179a794afd0eccfb5c5d6282d6c044478e2ea 100644 (file)
 #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
index 6e5fa735e80017f7732f773e561f570d6af1dc9a..6cb5beca1672e9de851b0ac56bc8ddd63759966c 100644 (file)
 #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