staging: rtl8723bs: remove unused pHalData variable
PATCH 1/1 staging: rtl8723bs: remove unused pHalData variable
clang with W=1 reports drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:23: error: variable
'pHalData' set but not used [-Werror,-Wunused-but-set-variable]
struct hal_com_data *pHalData;
^This variable is not used so remove it.
--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -4
@@ -1179,10 +1179,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)void hal_btcoex_SetChipType (struct adapter *padapter,u8 chipType) { -struct hal_com_data *pHalData; - - - pHalData =GET_HAL_DATA (padapter); }void hal_btcoex_SetPgAntNum (struct adapter *padapter,u8 antNum)
Signature · 1 line
2.27.0
Quoted 17 lines · Tom Rix
clang with W=1 reports
drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:23: error: variable
'pHalData' set but not used [-Werror,-Wunused-but-set-variable]struct hal_com_data *pHalData; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-0
drivers/staging/rtl8723bs/hal/hal_btcoex.c bool hal_btcoex_IsBtDisabled(struct adapter *padapter) · line 1182
Quoted 8 lines
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-4@@ -1179,10 +1179,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)void hal_btcoex_SetChipType (struct adapter *padapter,u8 chipType) { -struct hal_com_data *pHalData; - - - pHalData =GET_HAL_DATA (padapter); }
If this function doesn't do anything, does it not make more sense to just remove this function entirely?
Best regards,
Nam
Greg KH
maintainerQuoted 19 lines · Nam Cao
Quoted 18 lines · Tom Rix
clang with W=1 reports
drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:23: error: variable
'pHalData' set but not used [-Werror,-Wunused-but-set-variable]struct hal_com_data *pHalData; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-0@@ -1179,10 +1179,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)
Quoted 10 lines
drivers/staging/rtl8723bs/hal/hal_btcoex.c bool hal_btcoex_IsBtDisabled(struct adapter *padapter) · line 1182
Quoted 7 lines
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-4void hal_btcoex_SetChipType (struct adapter *padapter,u8 chipType) { -struct hal_com_data *pHalData; - - - pHalData =GET_HAL_DATA (padapter); }If this function doesn't do anything, does it not make more sense to just remove this function entirely?
This function is already removed in linux-next, so it doesn't matter :)
thanks,
greg k-h
Quoted 29 lines · Greg KH
Quoted 19 lines · Nam Cao
Quoted 18 lines · Tom Rix
clang with W=1 reports
drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:23: error: variable
'pHalData' set but not used [-Werror,-Wunused-but-set-variable]struct hal_com_data *pHalData; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-0@@ -1179,10 +1179,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)Quoted 9 lines
drivers/staging/rtl8723bs/hal/hal_btcoex.c bool hal_btcoex_IsBtDisabled(struct adapter *padapter) · line 1182
Quoted 7 lines
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-4void hal_btcoex_SetChipType (struct adapter *padapter,u8 chipType) { -struct hal_com_data *pHalData; - - - pHalData =GET_HAL_DATA (padapter); }If this function doesn't do anything, does it not make more sense to just remove this function entirely?
Quoted 1 line
This function is already removed in linux-next, so it doesn't matter :)
My patch is against linux-next from tag next-20230324
Tom
Quoted 5 lines
thanks,
greg k-h
Greg KH
maintainerQuoted 30 lines · Tom Rix
Quoted 28 lines · Greg KH
Quoted 27 lines · Nam Cao
Quoted 17 lines · Tom Rix
clang with W=1 reports
drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:23: error: variable
'pHalData' set but not used [-Werror,-Wunused-but-set-variable]struct hal_com_data *pHalData; ^This variable is not used so remove it.
Signed-off-by Tom Rix <[email protected]>--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-0drivers/staging/rtl8723bs/hal/hal_btcoex.c bool hal_btcoex_IsBtDisabled(struct adapter *padapter) · line 1181
Quoted 7 lines
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0
-4@@ -1179,10 +1179,6 @@ bool hal_btcoex_IsBtDisabled(struct adapter *padapter)void hal_btcoex_SetChipType (struct adapter *padapter,u8 chipType) { -struct hal_com_data *pHalData; - - - pHalData =GET_HAL_DATA (padapter); }If this function doesn't do anything, does it not make more sense to just remove this function entirely?
Quoted 3 lines
Quoted 1 line
This function is already removed in linux-next, so it doesn't matter :)
My patch is against linux-next from tag next-20230324
Ah, ok, well it will be gone in the next one, as this is already gone in my tree.
thanks,
greg k-h