diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-04-21 22:59:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-28 12:10:51 +0200 |
commit | f55a6d457b215e5a382d6001a166ae2089fc81b6 (patch) | |
tree | f0f11c5f379ecc92ac54d5d518b6e4477bfadd58 /drivers/staging/rtl8723bs/core | |
parent | staging: rtl8723bs: fix empty-body warning (diff) | |
download | linux-dev-f55a6d457b215e5a382d6001a166ae2089fc81b6.tar.xz linux-dev-f55a6d457b215e5a382d6001a166ae2089fc81b6.zip |
staging: rtl8723bs: rework debug configuration handling
I ran into this warning during randconfig testing:
drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_deinit':
drivers/staging/rtl8723bs/os_dep/rtw_proc.c:738:25: error: unused variable 'drv_proc' [-Werror=unused-variable]
drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_replace':
drivers/staging/rtl8723bs/os_dep/rtw_proc.c:762:25: error: unused variable 'drv_proc' [-Werror=unused-variable]
The problem is that the code procfs code gets built even when CONFIG_PROC_FS
is disabled, but some functions are turned into empty stubs then. This
is easily addressed by adding an #ifdef around the definition of the
CONFIG_PROC_DEBUG macro.
However, I could not bear looking at the macro name that clashes with the
Kconfig name space, so I also renamed it to simply PROC_DEBUG, along with
the other rtl8723bs specific CONFIG_DEBUG_* macros that I renamed the same
way. This is consistent with how we handle the same checks in the non-staging
rtlwifi driver.
As the code path for !CONFIG_PROC_DEBUG had not been tested properly, it
turned out to be incorrect and requires adding 'static inline' annotations
for the stub handlers, and moving some variables around.
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_debug.c | 11 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 |
3 files changed, 8 insertions, 11 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 24ba0533572e..080c81b9aa94 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -1744,6 +1744,8 @@ exit: return res; } +u32 g_wait_hiq_empty = 0; + static void rtw_chk_hi_queue_hdl(struct adapter *padapter) { struct sta_info *psta_bmc; diff --git a/drivers/staging/rtl8723bs/core/rtw_debug.c b/drivers/staging/rtl8723bs/core/rtw_debug.c index fc6b94d59c37..3db02e9f27ab 100644 --- a/drivers/staging/rtl8723bs/core/rtw_debug.c +++ b/drivers/staging/rtl8723bs/core/rtw_debug.c @@ -19,7 +19,7 @@ u32 GlobalDebugLevel = _drv_err_; -#ifdef CONFIG_DEBUG_RTL871X +#ifdef DEBUG_RTL871X u64 GlobalDebugComponents = \ _module_rtl871x_xmit_c_ | @@ -52,7 +52,7 @@ u32 GlobalDebugLevel = _drv_err_; _module_mp_ | _module_efuse_; -#endif /* CONFIG_DEBUG_RTL871X */ +#endif /* DEBUG_RTL871X */ #include <rtw_version.h> @@ -140,7 +140,7 @@ void rf_reg_dump(void *sel, struct adapter *adapter) } } -#ifdef CONFIG_PROC_DEBUG +#ifdef PROC_DEBUG ssize_t proc_set_write_reg(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data) { struct net_device *dev = data; @@ -605,9 +605,6 @@ ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t c return count; } -u8 g_fwdl_chksum_fail = 0; -u8 g_fwdl_wintint_rdy_fail = 0; - ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data) { char tmp[32]; @@ -622,8 +619,6 @@ ssize_t proc_set_fwdl_test_case(struct file *file, const char __user *buffer, si return count; } -u32 g_wait_hiq_empty = 0; - ssize_t proc_set_wait_hiq_empty(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data) { char tmp[32]; diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 697b81e2140c..17d881d66910 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -4844,7 +4844,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid } chplan_ap.Len = i; -#ifdef CONFIG_DEBUG_RTL871X +#ifdef DEBUG_RTL871X i = 0; DBG_871X("%s: AP[%s] channel plan {", __func__, bssid->Ssid.Ssid); while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] != 0)) { @@ -4855,7 +4855,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid #endif memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta)); -#ifdef CONFIG_DEBUG_RTL871X +#ifdef DEBUG_RTL871X i = 0; DBG_871X("%s: STA channel plan {", __func__); while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0)) { @@ -4992,7 +4992,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid pmlmeext->update_channel_plan_by_ap_done = 1; -#ifdef CONFIG_DEBUG_RTL871X +#ifdef DEBUG_RTL871X k = 0; DBG_871X("%s: new STA channel plan {", __func__); while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0)) { |