* [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces in rtl8723b_cmd
@ 2025-07-16 17:51 Ignacio Peña
2025-07-16 17:51 ` [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary commented code " Ignacio Peña
0 siblings, 1 reply; 3+ messages in thread
From: Ignacio Peña @ 2025-07-16 17:51 UTC (permalink / raw)
To: gregkh, linux-staging; +Cc: Ignacio Pena
From: Ignacio Pena <ignacio.pena87@gmail.com>
Remove braces that are not necessary for single statement blocks
to fix checkpatch warnings.
Signed-off-by: Ignacio Pena <ignacio.pena87@gmail.com>
---
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(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 56526056d..abc123def 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -57,13 +57,11 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd
if (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;
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary commented code in rtl8723b_cmd
2025-07-16 17:51 [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces in rtl8723b_cmd Ignacio Peña
@ 2025-07-16 17:51 ` Ignacio Peña
2025-07-24 9:28 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Ignacio Peña @ 2025-07-16 17:51 UTC (permalink / raw)
To: gregkh, linux-staging; +Cc: Ignacio Pena
From: Ignacio Pena <ignacio.pena87@gmail.com>
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 <ignacio.pena87@gmail.com>
---
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(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index abc123def..def456abc 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -78,7 +78,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd
else {
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);
}
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary commented code in rtl8723b_cmd
2025-07-16 17:51 ` [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary commented code " Ignacio Peña
@ 2025-07-24 9:28 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-07-24 9:28 UTC (permalink / raw)
To: Ignacio Peña; +Cc: linux-staging
On Wed, Jul 16, 2025 at 01:51:13PM -0400, Ignacio Peña wrote:
> From: Ignacio Pena <ignacio.pena87@gmail.com>
>
> 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 <ignacio.pena87@gmail.com>
> ---
> 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(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
> index abc123def..def456abc 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
> @@ -78,7 +78,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd
> else {
> 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) ;
> -*/
> -
> - }
> -
Does this build?
It doesn't apply, so it doesn't matter much :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-24 9:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 17:51 [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary braces in rtl8723b_cmd Ignacio Peña
2025-07-16 17:51 ` [PATCH v2 2/2] staging: rtl8723bs: remove unnecessary commented code " Ignacio Peña
2025-07-24 9:28 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox