public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v3] staging: rtl8723bs: remove shadowed variable in sdio_halinit
@ 2026-02-10 18:56 Haroen Tmimi
  2026-02-10 22:51 ` Ethan Tidmore
  0 siblings, 1 reply; 2+ messages in thread
From: Haroen Tmimi @ 2026-02-10 18:56 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Haroen Tmimi

The variable 'bMacPwrCtrlOn' was redeclared in the function
CardEnable, shadowing a variable of the same name declared at the
top of the function (line 21).

Remove the redundant 'u8' type declaration to use the existing outer
variable and resolve a -Wshadow warning.

Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>
---
Changes in v3:
Resending clean patch (v2 accidentally included unrelated changes
from another commit due to an oversight).

Changes in v2:
Removed incorrect blank line after the opening brace that was left
behind when removing the Adapter variable.

drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 0fa1b22fdf9a..861d5162de15 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -30,7 +30,7 @@ static u8 CardEnable(struct adapter *padapter)
 
 		ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_enable_flow);
 		if (ret == _SUCCESS) {
-			u8 bMacPwrCtrlOn = true;
+			bMacPwrCtrlOn = true;
 			rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
 		}
 	} else
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] staging: rtl8723bs: remove shadowed variable in sdio_halinit
  2026-02-10 18:56 [PATCH v3] staging: rtl8723bs: remove shadowed variable in sdio_halinit Haroen Tmimi
@ 2026-02-10 22:51 ` Ethan Tidmore
  0 siblings, 0 replies; 2+ messages in thread
From: Ethan Tidmore @ 2026-02-10 22:51 UTC (permalink / raw)
  To: Haroen Tmimi, gregkh; +Cc: linux-staging, linux-kernel

On Tue Feb 10, 2026 at 12:56 PM CST, Haroen Tmimi wrote:
> The variable 'bMacPwrCtrlOn' was redeclared in the function
> CardEnable, shadowing a variable of the same name declared at the
> top of the function (line 21).
>
> Remove the redundant 'u8' type declaration to use the existing outer
> variable and resolve a -Wshadow warning.
>
> Signed-off-by: Haroen Tmimi <tmimiharoen@gmail.com>
> ---

LGTM.

Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>

Thanks,

ET

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-10 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 18:56 [PATCH v3] staging: rtl8723bs: remove shadowed variable in sdio_halinit Haroen Tmimi
2026-02-10 22:51 ` Ethan Tidmore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox