• Arnd Bergmann's avatar
    staging: rtl8723bs: rework debug configuration handling · f55a6d45
    Arnd Bergmann authored
    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: 554c0a3a ("staging: Add rtl8723bs sdio wifi driver")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f55a6d45
rtl8723b_cmd.c 72.9 KB