Skip to contentSkip to conversation

remove return statement

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove return statement

staging : rtl8188e : remove return in void function

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

---
 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
#1 lore raw
Quoted 1 line · surenderpolsani

staging : rtl8188e : remove return in void function

Your patch subject isn't correct.

It should be something like:

Subject: [PATCH] staging: rtl8188e: Remove void function return

Quoted 2 lines

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

[]

drivers/staging/rtl8188eu/hal/rtl8188e_dm.c

Quoted 1 line
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +0 -0

[]

drivers/staging/rtl8188eu/hal/rtl8188e_dm.c void rtw_hal_dm_watchdog(struct adapter *Adapter) · line 168

Quoted 5 lines
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +0 -1
@@ -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;

And the comments?
Are those supposed to be reminders of code to write?

#2 lore raw
In reply to surenderpolsani
url: https://github.com/0day-ci/linux/commits/surenderpolsani/remove-return-statement/20170415-130917 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901…

Hi surenderpolsani,

[auto build test ERROR on v4.9-rc8]
[also build test ERROR on next-20170413]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/surenderpolsani/remove-return-statement/20170415-130917
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

drivers/staging/rtl8188eu/hal/rtl8188e_dm.c: In function 'rtw_hal_dm_watchdog':

>> drivers/staging/rtl8188eu/hal/rtl8188e_dm.c:165:1: error: label at end of compound statement
    skip_dm:
    ^~~~~~~

vim +165 drivers/staging/rtl8188eu/hal/rtl8188e_dm.c

7ef8ded0 Larry Finger 2013-08-21  159  		if (check_fwstate(pmlmepriv, _FW_LINKED))
7ef8ded0 Larry Finger 2013-08-21  160  			bLinked = true;
7ef8ded0 Larry Finger 2013-08-21  161  	}
7ef8ded0 Larry Finger 2013-08-21  162  
177aa53a Ivan Safonov 2016-09-19  163  	Adapter->HalData->odmpriv.bLinked = bLinked;
177aa53a Ivan Safonov 2016-09-19  164  	ODM_DMWatchdog(&Adapter->HalData->odmpriv);
7ef8ded0 Larry Finger 2013-08-21 @165  skip_dm:
7ef8ded0 Larry Finger 2013-08-21  166  	/*  Check GPIO to determine current RF on/off and Pbc status. */
7ef8ded0 Larry Finger 2013-08-21  167  	/*  Check Hardware Radio ON/OFF or not */
7ef8ded0 Larry Finger 2013-08-21  168  }

:::::: The code at line 165 was first introduced by commit
:::::: 7ef8ded0cfdb690e37581af85eea35fa67cdb38d staging: r8188eu: Add files for new driver - part 13

:::::: TO: Larry Finger <[email protected]> :::::: CC: Greg Kroah-Hartman <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation