staging: rtl8723bs: remove unnecessary braces in rtl8723b_cmd
PATCH v2 1/2 staging: rtl8723bs: remove unnecessary braces in rtl8723b_cmd
From: Ignacio Pena <[email protected]>
Remove braces that are not necessary for single statement blocks to fix checkpatch warnings.
---
Changes in v2:
- Dropped the yoda condition fix as Dan Carpenter suggested the function needs deeper cleanup
- Split patches to address one type of issue at a time
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +2 -4
@@ -57,13 +57,11 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdif (mutex_lock_interruptible (&(adapter_to_dvobj (padapter)->h2c_fwcmd_mutex)))return ret; -if (!pCmdBuffer) { +if (!pCmdBuffer) goto exit; - } -if (CmdLen >RTL8723B_MAX_CMD_LEN ) { +if (CmdLen >RTL8723B_MAX_CMD_LEN ) goto exit; - }if (padapter->bSurpriseRemoved) goto exit;
Signature · 1 line
2.39.5
PATCH v2 2/2 staging: rtl8723bs: remove unnecessary commented code in rtl8723b_cmd
From: Ignacio Pena <[email protected]>
Remove commented out code that serves no purpose, as suggested by Greg KH. This includes both single line comments and block comments that are not providing useful documentation.
---
Changes in v2:
- Remove entire commented blocks instead of just fixing formatting
- Combined comment removal patches as they serve the same purpose
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -11
@@ -78,7 +78,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdelse {memcpy ((u8 *)(&h2c_cmd)+1 , pCmdBuffer,3 );memcpy ((u8 *)(&h2c_cmd_ex), pCmdBuffer+3 , CmdLen-3 ); -/* *(u8 *)(&h2c_cmd) |= BIT(7); */ } *(u8 *)(&h2c_cmd) |= ElementID;
@@ -433,16 +432,6 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode) } -/* offload to FW if fw version > v15.10 -pmlmeext->DrvBcnEarly = 0; -pmlmeext->DrvBcnTimeOut =7; - -if ((pmlmeext->DrvBcnEarly!= 0Xff) && (pmlmeext->DrvBcnTimeOut!= 0xff)) -u1H2CPwrModeParm[H2C_PWRMODE_LEN-1] = BIT(0) | ((pmlmeext->DrvBcnEarly<<1)&0x0E) |((pmlmeext->DrvBcnTimeOut<<4)&0xf0) ; -*/ - - } -FillH2CCmd8723B (padapter,H2C_8723B_SET_PWR_MODE ,H2C_PWRMODE_LEN , u1H2CPwrModeParm); }
Signature · 1 line
2.39.5
Greg KH
maintainerRe: [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary commented code in rtl8723b_cmd
Quoted 31 lines · Ignacio Peña
From: Ignacio Pena <[email protected]>
Remove commented out code that serves no purpose, as suggested by Greg KH. This includes both single line comments and block comments that are not providing useful documentation.
Signed-off-by Ignacio Pena <[email protected]>---
Changes in v2:
- Remove entire commented blocks instead of just fixing formatting
- Combined comment removal patches as they serve the same purposedrivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 11 ----------- 1 file changed, 11 deletions(-)drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0
-1@@ -78,7 +78,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdelse {memcpy ((u8 *)(&h2c_cmd)+1 , pCmdBuffer,3 );memcpy ((u8 *)(&h2c_cmd_ex), pCmdBuffer+3 , CmdLen-3 ); -/* *(u8 *)(&h2c_cmd) |= BIT(7); */ } *(u8 *)(&h2c_cmd) |= ElementID;@@ -433,16 +432,6 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode) }
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, u8 psmode) · line 445
Quoted 10 lines
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0
-10-/* offload to FW if fw version > v15.10 -pmlmeext->DrvBcnEarly = 0; -pmlmeext->DrvBcnTimeOut =7; - -if ((pmlmeext->DrvBcnEarly!= 0Xff) && (pmlmeext->DrvBcnTimeOut!= 0xff)) -u1H2CPwrModeParm[H2C_PWRMODE_LEN-1] = BIT(0) | ((pmlmeext->DrvBcnEarly<<1)&0x0E) |((pmlmeext->DrvBcnTimeOut<<4)&0xf0) ; -*/ - - } -
Does this build?
It doesn't apply, so it doesn't matter much :)
thanks,
greg k-h