All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: remove unnecessary goto jumps
@ 2021-04-10 13:33 Bryan Brattlof
  2021-04-10 13:36 ` Greg Kroah-Hartman
  2021-04-10 14:49   ` kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Bryan Brattlof @ 2021-04-10 13:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Hans de Goede, Larry Finger
  Cc: linux-staging, linux-kernel, kernel-janitors, 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 __init rtw_drv_entry()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 9fd926e1698f..84ac81d19746 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -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;
 }
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove unnecessary goto jumps
  2021-04-10 13:33 [PATCH] staging: rtl8723bs: remove unnecessary goto jumps Bryan Brattlof
@ 2021-04-10 13:36 ` Greg Kroah-Hartman
  2021-04-10 14:49   ` kernel test robot
  1 sibling, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-10 13:36 UTC (permalink / raw)
  To: Bryan Brattlof
  Cc: Hans de Goede, Larry Finger, linux-staging, linux-kernel,
	kernel-janitors

On Sat, Apr 10, 2021 at 01:33:09PM +0000, Bryan Brattlof wrote:
> 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()
> 
> Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index 9fd926e1698f..84ac81d19746 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -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);

Why did you change this line?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove unnecessary goto jumps
  2021-04-10 13:33 [PATCH] staging: rtl8723bs: remove unnecessary goto jumps Bryan Brattlof
@ 2021-04-10 14:49   ` kernel test robot
  2021-04-10 14:49   ` kernel test robot
  1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-04-10 14:49 UTC (permalink / raw)
  To: Bryan Brattlof, Greg Kroah-Hartman, Hans de Goede, Larry Finger
  Cc: kbuild-all, linux-staging, linux-kernel, kernel-janitors, Bryan Brattlof

[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]

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
Reported-by: kernel test robot <lkp@intel.com>

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_LEVEL
   cc1: 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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69034 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove unnecessary goto jumps
@ 2021-04-10 14:49   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-04-10 14:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]

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
Reported-by: kernel test robot <lkp@intel.com>

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_LEVEL
   cc1: 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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 69034 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-10 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10 13:33 [PATCH] staging: rtl8723bs: remove unnecessary goto jumps Bryan Brattlof
2021-04-10 13:36 ` Greg Kroah-Hartman
2021-04-10 14:49 ` kernel test robot
2021-04-10 14:49   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.