Skip to contentSkip to conversation

staging: rtl8723bs: remove unused variable 'phal'

PATCH In review George Karagounis 2 participants 2 messages Sep 24 – Oct 1 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove unused variable 'phal'

In rtl8723bs_init_xmit_priv() the variable 'phal' is assigned via GET_HAL_DATA() but never actually read.

This triggers a -Wunused-but-set-variable compiler warning when building the driver with W=1. I removed the unused variable and its assignment to clean up the code and silence the warning.

---
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -3
index 7f55448d544e..0441e84ea87d 100644
@@ -525,9 +525,6 @@ s32	rtl8723bs_hal_xmitframe_enqueue(
 s32 rtl8723bs_init_xmit_priv(struct adapter *padapter)
 {
 	struct xmit_priv *xmitpriv = &padapter->xmitpriv;
-	struct hal_com_data *phal;
-
-	phal = GET_HAL_DATA(padapter);
 
 	init_completion(&xmitpriv->SdioXmitStart);
 	init_completion(&xmitpriv->SdioXmitTerminate);
Signature · 1 line
2.55.0
#1 lore raw
Quoted 29 lines · George Karagounis

In rtl8723bs_init_xmit_priv() the variable 'phal' is assigned via GET_HAL_DATA() but never actually read.

This triggers a -Wunused-but-set-variable compiler warning when building the driver with W=1. I removed the unused variable and its assignment to clean up the code and silence the warning.

---
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0 -3
index 7f55448d544e..0441e84ea87d 100644
@@ -525,9 +525,6 @@ s32	rtl8723bs_hal_xmitframe_enqueue(
 s32 rtl8723bs_init_xmit_priv(struct adapter *padapter)
 {
 	struct xmit_priv *xmitpriv = &padapter->xmitpriv;
-	struct hal_com_data *phal;
-
-	phal = GET_HAL_DATA(padapter);
 
 	init_completion(&xmitpriv->SdioXmitStart);
 	init_completion(&xmitpriv->SdioXmitTerminate);
Signature · 1 line
2.55.0

Does not apply to the tree as it's been sent many times in the past and already applied.

Did everyone just go through some tutorial and decide to send the same change?

thanks,

greg k-h