staging: rtl8723bs: remove unnecessary goto jumps
Subsystems (2)
PATCH 1/1 staging: rtl8723bs: remove unnecessary goto jumps
The next instruction for both 'goto exit' jump statements is to execute the exit jump instructions regardless. We can safely remove all jump statements from __init rtw_drv_entry()
--- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -5
@@ -517,13 +517,9 @@ static int __init rtw_drv_entry(void)if (ret !=0 ) { sdio_drvpriv.drv_registered = false;rtw_ndev_notifier_unregister (); - goto exit; } - goto exit; - -exit: -DBG_871X_LEVEL (_drv_always_,"module init ret =%d\n" , ret); +DBG_870X_LEVEL (_drv_always_,"module init ret =%d\n" , ret);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerQuoted 15 lines · Bryan Brattlof
The next instruction for both 'goto exit' jump statements is to execute the exit jump instructions regardless. We can safely remove all jump statements from
__initrtw_drv_entry()Signed-off-by Bryan Brattlof <[email protected]>--- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0
-0@@ -517,13 +517,9 @@ static int __init rtw_drv_entry(void)if (ret !=0 ) {
drivers/staging/rtl8723bs/os_dep/sdio_intf.c static int __init rtw_drv_entry(void) · line 522
Quoted 10 lines
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1
-5sdio_drvpriv.drv_registered = false;rtw_ndev_notifier_unregister (); - goto exit; } - goto exit; - -exit: -DBG_871X_LEVEL (_drv_always_,"module init ret =%d\n" , ret); +DBG_870X_LEVEL (_drv_always_,"module init ret =%d\n" , ret);
Why did you change this line?
thanks,
greg k-h
kernel test robot
build botThank you for the patch! Yet something to improve:
Hi Bryan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Bryan-Brattlof/staging-rtl8723bs-remove-unnecessary-goto-jumps/20210410-213334 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 32abcac8037da5dc570c22abf266cbb92eee9fc9 config: sparc-allyesconfig (attached as .config) compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/244bc6c6b650db830cbd316043711fda4f2f34d9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bryan-Brattlof/staging-rtl8723bs-remove-unnecessary-goto-jumps/20210410-213334 git checkout 244bc6c6b650db830cbd316043711fda4f2f34d9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
drivers/staging/rtl8723bs/os_dep/sdio_intf.c: In function 'rtw_drv_entry':
>> drivers/staging/rtl8723bs/os_dep/sdio_intf.c:522:2: error: implicit declaration of function 'DBG_870X_LEVEL'; did you mean 'DBG_871X_LEVEL'? [-Werror=implicit-function-declaration]
522 | DBG_870X_LEVEL(_drv_always_, "module init ret =%d\n", ret);
| ^~~~~~~~~~~~~~
| DBG_871X_LEVELcc1: some warnings being treated as errors
vim +522 drivers/staging/rtl8723bs/os_dep/sdio_intf.c
513
514 sdio_drvpriv.drv_registered = true;
515
516 ret = sdio_register_driver(&sdio_drvpriv.r871xs_drv);
517 if (ret != 0) {
518 sdio_drvpriv.drv_registered = false;
519 rtw_ndev_notifier_unregister();
520 }
521
> 522 DBG_870X_LEVEL(_drv_always_, "module init ret =%d\n", ret);
523 return ret;
524 }
525
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org