staging: rtl8723bs: core: Remove unused but set variable
PATCH 1/1 staging: rtl8723bs: core: Remove unused but set variable
Removed "ledBlink_param" because it was set to the value of "pbuf" but was never reused. This set was made by direct assignment (no helper had been called), therefore it had no side effect to the location pointed by "pbuf".
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -2
@@ -6191,12 +6191,10 @@ u8 set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf)u8 led_blink_hdl (struct adapter *padapter,unsigned char *pbuf) { -struct LedBlink_param *ledBlink_param;if (!pbuf)return H2C_PARAMETERS_ERROR ; - ledBlink_param = (struct LedBlink_param *)pbuf;return H2C_SUCCESS ; }
Signature · 1 line
2.31.1
Quoted 15 lines · Fabio M. De Francesco
Removed "
ledBlink_param" because it was set to the value of "pbuf" but was never reused. This set was made by direct assignment (no helper had been called), therefore it had no side effect to the location pointed by "pbuf".Signed-off-by Fabio M. De Francesco <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-0@@ -6191,12 +6191,10 @@ u8 set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c u8 set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf) · line 6199
Quoted 10 lines
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-2u8 led_blink_hdl (struct adapter *padapter,unsigned char *pbuf) { -struct LedBlink_param *ledBlink_param;if (!pbuf)return H2C_PARAMETERS_ERROR ; - ledBlink_param = (struct LedBlink_param *)pbuf;return H2C_SUCCESS ; }
Is this function actually useful?
julia
Quoted 30 lines · CEST Julia Lawall
Quoted 29 lines · Fabio M. De Francesco
Removed "
ledBlink_param" because it was set to the value of "pbuf" but was never reused. This set was made by direct assignment (no helper had been called), therefore it had no side effect to the location pointed by "pbuf".Signed-off-by Fabio M. De Francesco <[email protected]>---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 -- 1 file changed, 2 deletions(-)(quoted diff) +0
-0
b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.cindexf19a15a3924b..440e22922106100644drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-0@@ -6191,12 +6191,10 @@ u8 set_chplan_hdl(struct adapter *padapter,unsigned char *pbuf)>
u8led_blink_hdl(struct adapter *padapter, unsigned char *pbuf){drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0
-2-struct LedBlink_param *ledBlink_param;if (!pbuf)return H2C_PARAMETERS_ERROR ; - ledBlink_param = (struct LedBlink_param *)pbuf;
Quoted 8 lines
Quoted 3 lines
return
H2C_SUCCESS;}
Is this function actually useful?
julia
Actually, it is completely useless.
We should ask the original authors for explanations :)
I'm about to grep the whole driver for the purpose to check if there are callers elsewhere and then delete any call and the function itself.
Thanks,
Fabio