staging: rtl8723bs: remove unused variable 'phal'
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
@@ -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
Greg Kroah-Hartman
maintainerQuoted 29 lines · George Karagounis
In
rtl8723bs_init_xmit_priv()the variable 'phal' is assigned viaGET_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.
Signed-off-by George Karagounis <[email protected]>--- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 --- 1 file changed, 3 deletions(-)drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0
-3@@ -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