All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8723bs: remove unnecessary goto jumps
@ 2021-04-10 14:20 Bryan Brattlof
  2021-04-10 14:28 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan Brattlof @ 2021-04-10 14:20 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>
---
Changes from:
  v1: removed unnecessary edit of DBG_871X_LEVEL

 drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 9fd926e1698f..39b6d4b6dec4 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -517,12 +517,8 @@ 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);
 	return ret;
 }
@@ -540,6 +536,5 @@ static void __exit rtw_drv_halt(void)
 	DBG_871X_LEVEL(_drv_always_, "module exit success\n");
 }
 
-
 module_init(rtw_drv_entry);
 module_exit(rtw_drv_halt);
-- 
2.27.0



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

* Re: [PATCH v2] staging: rtl8723bs: remove unnecessary goto jumps
  2021-04-10 14:20 [PATCH v2] staging: rtl8723bs: remove unnecessary goto jumps Bryan Brattlof
@ 2021-04-10 14:28 ` Greg Kroah-Hartman
  2021-04-10 14:56   ` Bryan Brattlof
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-10 14:28 UTC (permalink / raw)
  To: Bryan Brattlof
  Cc: Hans de Goede, Larry Finger, linux-staging, linux-kernel,
	kernel-janitors

On Sat, Apr 10, 2021 at 02:20:19PM +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>
> ---
> Changes from:
>   v1: removed unnecessary edit of DBG_871X_LEVEL
> 
>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index 9fd926e1698f..39b6d4b6dec4 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -517,12 +517,8 @@ 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);
>  	return ret;
>  }
> @@ -540,6 +536,5 @@ static void __exit rtw_drv_halt(void)
>  	DBG_871X_LEVEL(_drv_always_, "module exit success\n");
>  }
>  
> -
>  module_init(rtw_drv_entry);
>  module_exit(rtw_drv_halt);

Any reason you removed this extra line?

thanks,

greg k-h

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

* Re: [PATCH v2] staging: rtl8723bs: remove unnecessary goto jumps
  2021-04-10 14:28 ` Greg Kroah-Hartman
@ 2021-04-10 14:56   ` Bryan Brattlof
  0 siblings, 0 replies; 3+ messages in thread
From: Bryan Brattlof @ 2021-04-10 14:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Hans de Goede, Larry Finger, linux-staging, linux-kernel,
	kernel-janitors

On Sat, Apr 10, 2021 at 04:28:19PM +0200, Greg Kroah-Hartman wrote:
>
>On Sat, Apr 10, 2021 at 02:20:19PM +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>
>> ---
>> Changes from:
>>   v1: removed unnecessary edit of DBG_871X_LEVEL
>>
>>  drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 -----
>>  1 file changed, 5 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
>> index 9fd926e1698f..39b6d4b6dec4 100644
>> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
>> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
>> @@ -517,12 +517,8 @@ 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);
>>  	return ret;
>>  }
>> @@ -540,6 +536,5 @@ static void __exit rtw_drv_halt(void)
>>  	DBG_871X_LEVEL(_drv_always_, "module exit success\n");
>>  }
>>
>> -
>>  module_init(rtw_drv_entry);
>>  module_exit(rtw_drv_halt);
>
>Any reason you removed this extra line?
>

Oops! My bad... again :(

I removed the line to take away one of the many checkpatch.pl messages.

I'll be sending v3 here momentarily with an updated commit message

>
>thanks,
>
>greg k-h

Sorry for the noise today
--
~Bryan


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10 14:20 [PATCH v2] staging: rtl8723bs: remove unnecessary goto jumps Bryan Brattlof
2021-04-10 14:28 ` Greg Kroah-Hartman
2021-04-10 14:56   ` Bryan Brattlof

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.