]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: remove shadowed variable in sdio_halinit
authorHaroen Tmimi <tmimiharoen@gmail.com>
Tue, 10 Feb 2026 18:56:30 +0000 (19:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Feb 2026 15:17:08 +0000 (16:17 +0100)
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>
Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com>
Link: https://patch.msgid.link/20260210185630.54577-1-tmimiharoen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/sdio_halinit.c

index 0fa1b22fdf9a153873ed13c01b62beea170b5284..861d5162de15dc4936e84fc043c6505f7118e9d6 100644 (file)
@@ -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