public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [V4] staging : rtl8188eu : remove void function return
@ 2017-05-08  5:52 Surender Polsani
  2017-05-08  5:59 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Surender Polsani @ 2017-05-08  5:52 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:
changes made as suggested by Dan Carpenter
---
 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
index d04b7fb..bf9f10f 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -146,7 +146,6 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
 
 	if (!hw_init_completed)
 		goto skip_dm;
-
 	/* ODM */
 	pmlmepriv = &Adapter->mlmepriv;
 
@@ -165,7 +164,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] 3+ messages in thread

* Re: [V4] staging : rtl8188eu : remove void function return
  2017-05-08  5:52 [V4] staging : rtl8188eu : remove void function return Surender Polsani
@ 2017-05-08  5:59 ` Greg KH
  2017-05-08  6:27   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2017-05-08  5:59 UTC (permalink / raw)
  To: Surender Polsani; +Cc: devel, linux-kernel

On Mon, May 08, 2017 at 11:22:35AM +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
> Changes for v4:
> changes made as suggested by Dan Carpenter
> ---
>  drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
> index d04b7fb..bf9f10f 100644
> --- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
> +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
> @@ -146,7 +146,6 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
>  
>  	if (!hw_init_completed)
>  		goto skip_dm;
> -

Why did you remove this line?

>  	/* ODM */
>  	pmlmepriv = &Adapter->mlmepriv;
>  
> @@ -165,7 +164,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;
> +	;

Why is the ';' still here?

You do understand the C language, right?

thanks,

greg k-h

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

* Re: [V4] staging : rtl8188eu : remove void function return
  2017-05-08  5:59 ` Greg KH
@ 2017-05-08  6:27   ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2017-05-08  6:27 UTC (permalink / raw)
  To: Greg KH, Surender Polsani; +Cc: devel, linux-kernel, Dan Carpenter

On Mon, 2017-05-08 at 07:59 +0200, Greg KH wrote:
> On Mon, May 08, 2017 at 11:22:35AM +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
> > Changes for v4:
> > changes made as suggested by Dan Carpenter

No, Dan correctly suggested that the goto
and the label be removed, not what has been
done in this patch.

> > diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
[]
> > @@ -146,7 +146,6 @@ void rtw_hal_dm_watchdog(struct adapter *Adapter)
> >  
> >  	if (!hw_init_completed)
> >  		goto skip_dm;
> > -
> 
> Why did you remove this line?

I presume because of carelessness.

> >  	/* ODM */
> >  	pmlmepriv = &Adapter->mlmepriv;
> >  
> > @@ -165,7 +164,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;
> > +	;
> 
> Why is the ';' still here?

A label immediately before a function termination
requires a statement after the label and before the
last closing brace.

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

end of thread, other threads:[~2017-05-08  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-08  5:52 [V4] staging : rtl8188eu : remove void function return Surender Polsani
2017-05-08  5:59 ` Greg KH
2017-05-08  6:27   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox