Skip to contentSkip to conversation

staging : rtl8188eu : remove void function return

PATCH In review surenderpolsani 3 participants 3 messages Apr 15, 2017 – Apr 18, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging : rtl8188eu : remove void function return

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

---
Changes for v2:
corrected subject line as suggested

---
 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +0 -1
index d04b7fb..6db0e19 100644
@@ -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)
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 4 lines · surenderpolsani

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

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

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg KH
Quoted 4 lines · surenderpolsani

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

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.