linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging : rtl8188eu : remove void function return
@ 2017-04-21  3:54 surenderpolsani
  2017-04-28 10:28 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: surenderpolsani @ 2017-04-21  3:54 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, surenderpolsani

kernel coding style doesn't allow the return statement
in void function.

Signed-off-by: Surenderp <surenderpolsani@gmail.com>
---
Changes for v2:
corrected subject line as suggested
Changes for v3:
modified from line as suggested by Greg KH
placed a semicolon in label for fixing build error
---
 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
index d04b7fb..428996e 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -165,7 +165,7 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
 skip_dm:
 	/*  Check GPIO to determine current RF on/off and Pbc status. */
 	/*  Check Hardware Radio ON/OFF or not */
-	return;
+	;
 }
 
 void rtw_hal_dm_init(struct adapter *Adapter)
-- 
1.9.1

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

* Re: [PATCH] staging : rtl8188eu : remove void function return
  2017-04-21  3:54 [PATCH] staging : rtl8188eu : remove void function return surenderpolsani
@ 2017-04-28 10:28 ` Greg KH
  0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2017-04-28 10:28 UTC (permalink / raw)
  To: surenderpolsani; +Cc: devel, linux-kernel

On Fri, Apr 21, 2017 at 09:24:57AM +0530, surenderpolsani wrote:
> kernel coding style doesn't allow the return statement
> in void function.
> 
> Signed-off-by: Surenderp <surenderpolsani@gmail.com>

Your "From" line does not match this line.

And I need a "full" name here.

thanks,

greg k-h

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

* Re: [PATCH] staging : rtl8188eu : remove void function return
  2017-05-03 11:21 Surender Polsani
@ 2017-05-03 11:24 ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2017-05-03 11:24 UTC (permalink / raw)
  To: Surender Polsani; +Cc: gregkh, devel, linux-kernel

Nope.

regards,
dan carpenter

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

* [PATCH] staging : rtl8188eu : remove void function return
@ 2017-05-03 11:21 Surender Polsani
  2017-05-03 11:24 ` Dan Carpenter
  0 siblings, 1 reply; 9+ messages in thread
From: Surender Polsani @ 2017-05-03 11:21 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Surender Polsani

kernel coding style doesn't allow the return statement
in void function.

Signed-off-by: Surender Polsani <surenderpolsani@gmail.com>
---
Changes for v2:
corrected subject line as suggested
Changes for v3:
modified from line as suggested by Greg KH
placed a semicolon in label for fixing build error
Changes for v4:
removed label as suggested by Dan Carpenter
---
 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
index d04b7fb..f3871a5 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -144,8 +144,8 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
 
 	hw_init_completed = Adapter->hw_init_completed;
 
-	if (!hw_init_completed)
-		goto skip_dm;
+	if (hw_init_completed)
+	{
 
 	/* ODM */
 	pmlmepriv = &Adapter->mlmepriv;
@@ -162,10 +162,9 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
 
 	Adapter->HalData->odmpriv.bLinked = bLinked;
 	ODM_DMWatchdog(&Adapter->HalData->odmpriv);
-skip_dm:
+	}
 	/*  Check GPIO to determine current RF on/off and Pbc status. */
 	/*  Check Hardware Radio ON/OFF or not */
-	return;
 }
 
 void rtw_hal_dm_init(struct adapter *Adapter)
-- 
1.9.1

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

* Re: [PATCH] staging : rtl8188eu : remove void function return
  2017-05-03  5:59 Surender Polsani
@ 2017-05-03 10:46 ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2017-05-03 10:46 UTC (permalink / raw)
  To: Surender Polsani; +Cc: gregkh, devel, linux-kernel

On Wed, May 03, 2017 at 11:29:00AM +0530, Surender Polsani wrote:
> kernel coding style doesn't allow the return statement
> in void function.
> 
> Signed-off-by: Surender Polsani <surenderpolsani@gmail.com>
> ---
> Changes for v2:
> corrected subject line as suggested
> Changes for v3:
> modified from line as suggested by Greg KH
> placed a semicolon in label for fixing build error
> ---
>  drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
> index d04b7fb..428996e 100644
> --- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
> +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
> @@ -165,7 +165,7 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
>  skip_dm:
>  	/*  Check GPIO to determine current RF on/off and Pbc status. */
>  	/*  Check Hardware Radio ON/OFF or not */
> -	return;
> +	;

Just get rid of the label.

regards,
dan carpenter

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

* [PATCH] staging : rtl8188eu : remove void function return
@ 2017-05-03  5:59 Surender Polsani
  2017-05-03 10:46 ` Dan Carpenter
  0 siblings, 1 reply; 9+ messages in thread
From: Surender Polsani @ 2017-05-03  5:59 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Surender Polsani

kernel coding style doesn't allow the return statement
in void function.

Signed-off-by: Surender Polsani <surenderpolsani@gmail.com>
---
Changes for v2:
corrected subject line as suggested
Changes for v3:
modified from line as suggested by Greg KH
placed a semicolon in label for fixing build error
---
 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
index d04b7fb..428996e 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -165,7 +165,7 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
 skip_dm:
 	/*  Check GPIO to determine current RF on/off and Pbc status. */
 	/*  Check Hardware Radio ON/OFF or not */
-	return;
+	;
 }
 
 void rtw_hal_dm_init(struct adapter *Adapter)
-- 
1.9.1

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

* Re: [PATCH] staging : rtl8188eu : remove void function return
  2017-04-18 11:52 ` Greg KH
@ 2017-04-18 12:03   ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2017-04-18 12:03 UTC (permalink / raw)
  To: Greg KH, surenderpolsani; +Cc: devel, linux-kernel

On Tue, 2017-04-18 at 13:52 +0200, Greg KH wrote:
> On Sat, Apr 15, 2017 at 11:57:26AM +0530, surenderpolsani wrote:
> > kernel coding style doesn't allow the return statement
> > in void function.
> > 
> > Signed-off-by: surenderpolsani <surenderpolsani@gmail.com>
> 
> I need a "real" name here, and in the from line please.  Use what you
> use to sign documents.

You'll also need a patch that compiles properly.

void foo(void)
{
	goto bar;
bar:
}

doesn't compile with gcc.

This patch removes the required statement after the
label immediately before the function end.

It could be replaced by just a semicolon which is
done a few places in the kernel or just left as-is.

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

* Re: [PATCH] staging : rtl8188eu : remove void function return
  2017-04-15  6:27 surenderpolsani
@ 2017-04-18 11:52 ` Greg KH
  2017-04-18 12:03   ` Joe Perches
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2017-04-18 11:52 UTC (permalink / raw)
  To: surenderpolsani; +Cc: devel, linux-kernel

On Sat, Apr 15, 2017 at 11:57:26AM +0530, surenderpolsani wrote:
> kernel coding style doesn't allow the return statement
> in void function.
> 
> Signed-off-by: surenderpolsani <surenderpolsani@gmail.com>

I need a "real" name here, and in the from line please.  Use what you
use to sign documents.

thanks,

greg k-h

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

* [PATCH] staging : rtl8188eu : remove void function return
@ 2017-04-15  6:27 surenderpolsani
  2017-04-18 11:52 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: surenderpolsani @ 2017-04-15  6:27 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, surenderpolsani

kernel coding style doesn't allow the return statement
in void function.

Signed-off-by: surenderpolsani <surenderpolsani@gmail.com>
---
Changes for v2:
corrected subject line as suggested
---
 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
index d04b7fb..6db0e19 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -165,7 +165,6 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
 skip_dm:
 	/*  Check GPIO to determine current RF on/off and Pbc status. */
 	/*  Check Hardware Radio ON/OFF or not */
-	return;
 }
 
 void rtw_hal_dm_init(struct adapter *Adapter)
-- 
1.9.1

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

end of thread, other threads:[~2017-05-03 11:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21  3:54 [PATCH] staging : rtl8188eu : remove void function return surenderpolsani
2017-04-28 10:28 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-05-03 11:21 Surender Polsani
2017-05-03 11:24 ` Dan Carpenter
2017-05-03  5:59 Surender Polsani
2017-05-03 10:46 ` Dan Carpenter
2017-04-15  6:27 surenderpolsani
2017-04-18 11:52 ` Greg KH
2017-04-18 12:03   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).