lkml.org 
[lkml]   [2017]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [V4] staging : rtl8188eu : remove void function return
From
Date
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.

\
 
 \ /
  Last update: 2017-05-08 08:28    [W:0.437 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site