Skip to contentSkip to conversation

staging: rtl8723bs: remove unused pHalData variable

PATCH In review Tom Rix 3 participants 5 messages Mar 26, 2023 Staging

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

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
index e36f8c369a04..0cb2adcc1f78 100644
@@ -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
#1 lore raw
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.

---
 drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -0
index e36f8c369a04..0cb2adcc1f78 100644

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

maintainer
#2 lore raw
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.

---
 drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -0
index e36f8c369a04..0cb2adcc1f78 100644
@@ -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 -4
 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?

This function is already removed in linux-next, so it doesn't matter :)

thanks,

greg k-h

author
#3 lore raw
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.

---
  drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ----
  1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -0
index e36f8c369a04..0cb2adcc1f78 100644
@@ -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 -4
  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 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

maintainer
#4 lore raw
Quoted 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.

---
  drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ----
  1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +0 -0
index e36f8c369a04..0cb2adcc1f78 100644

drivers/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