diff options
author | Arnd Bergmann | 2017-04-21 22:59:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-04-28 12:10:51 +0200 |
commit | f55a6d457b215e5a382d6001a166ae2089fc81b6 (patch) | |
tree | f0f11c5f379ecc92ac54d5d518b6e4477bfadd58 /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | |
parent | staging: rtl8723bs: fix empty-body warning (diff) | |
download | kernel-qcow2-linux-f55a6d457b215e5a382d6001a166ae2089fc81b6.tar.gz kernel-qcow2-linux-f55a6d457b215e5a382d6001a166ae2089fc81b6.tar.xz kernel-qcow2-linux-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/os_dep/ioctl_linux.c')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c index e11045f2a1b6..916741371bee 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c @@ -4831,7 +4831,7 @@ static int rtw_wx_set_priv(struct net_device *dev, char *extra) { -#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV +#ifdef DEBUG_RTW_WX_SET_PRIV char *ext_dbg; #endif @@ -4860,7 +4860,7 @@ static int rtw_wx_set_priv(struct net_device *dev, /* ("rtw_wx_set_priv: %s req =%s\n", */ /* dev->name, ext)); */ - #ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV + #ifdef DEBUG_RTW_WX_SET_PRIV if (!(ext_dbg = vmalloc(len))) { vfree(ext, len); @@ -4918,7 +4918,7 @@ static int rtw_wx_set_priv(struct net_device *dev, FREE_EXT: vfree(ext); - #ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV + #ifdef DEBUG_RTW_WX_SET_PRIV vfree(ext_dbg); #endif |