staging: rtlwifi: Remove an extra pair of braces
PATCH 1/1 staging: rtlwifi: Remove an extra pair of braces
Remove an extra pair of braces. Issue found while reviewing one of Coccinelle's semantic patch results for returnvar.cocci.
--- drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +1 -3
@@ -484,9 +484,7 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)s32 odm_signal_scale_mapping (struct phy_dm_struct *dm,s32 curr_sig) { - { -return curr_sig; - } +return curr_sig; } static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 13 lines · Maya Nakamura
Remove an extra pair of braces. Issue found while reviewing one of Coccinelle's semantic patch results for
returnvar.cocci.Signed-off-by Maya Nakamura <[email protected]>--- drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +0
-0
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c static u8 odm_query_rx_pwr_percentage(s8 ant_power) · line 488
Quoted 8 lines
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +1
-3@@ -484,9 +484,7 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)s32 odm_signal_scale_mapping (struct phy_dm_struct *dm,s32 curr_sig) { - { -return curr_sig; - } +return curr_sig; }
Why is this function needed at all? Can't it just be removed and only use the curr_sig parameter where it is called?
thanks,
greg k-h
Quoted 27 lines · Greg KH
Quoted 13 lines · Maya Nakamura
Remove an extra pair of braces. Issue found while reviewing one of Coccinelle's semantic patch results for
returnvar.cocci.Signed-off-by Maya Nakamura <[email protected]>--- drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +0
-0drivers/staging/rtlwifi/phydm/phydm_hwconfig.c static u8 odm_query_rx_pwr_percentage(s8 ant_power) · line 488
Quoted 8 lines
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +1
-3@@ -484,9 +484,7 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)s32 odm_signal_scale_mapping (struct phy_dm_struct *dm,s32 curr_sig) { - { -return curr_sig; - } +return curr_sig; }Why is this function needed at all? Can't it just be removed and only use the
curr_sigparameter where it is called?
Quoted 3 lines
thanks,
greg k-h
Thank you for suggesting further changes to the file! As you pointed out, I can modify where the specific function is called (five places) and remove the function's declaration/definition. I will submit a new patch.
Maya