staging: rtlwifi: phydm: remove unnecessary parentheses
PATCH 1/1 staging: rtlwifi: phydm: remove unnecessary parentheses
Remove unnecessary parentheses around the right hand side of assignment operator. Suggested by Coccinelle.
--- drivers/staging/rtlwifi/phydm/phydm.c | 2 +- drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtlwifi/phydm/phydm.c +1 -1
@@ -1767,7 +1767,7 @@ static u8 phydm_calculate_intf_distance(void *dm_void, u32 bw, u32 fc, int_distance = (fc >= f_interference) ? (fc - f_interference) : (f_interference - fc); tone_idx_tmp = - (int_distance <<5 );/* =10*(int_distance /0.3125) */ + int_distance <<5 ;/* =10*(int_distance /0.3125) */ ODM_RT_TRACE( dm, ODM_COMP_API, "int_distance = ((%d MHz)) Mhz, tone_idx_tmp = ((%d.%d))\n",
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +1 -1
@@ -1790,7 +1790,7 @@ phydm_process_rssi_for_dm_new_type(struct phy_dm_struct *dm,if (undecorated_smoothed_pwdb <=0 ) { accumulate_pwdb = - (phy_info->rx_pwdb_all << scaling_factor); + phy_info->rx_pwdb_all << scaling_factor; undecorated_smoothed_pwdb = phy_info->rx_pwdb_all; }else { accumulate_pwdb = accumulate_pwdb -
Signature · 1 line
2.17.1
Quoted 2 lines · Himadri Pandya
Remove unnecessary parentheses around the right hand side of assignment operator. Suggested by Coccinelle.
Actually, I'm not sure that "Suggested by Coccinelle" is the best phrasing. Coccinelle doesn't suggest things on its own. You write a semantic patch, and then the semantic patch suggests something. Found using Coccinelle would be better.
julia
Quoted 43 lines
Signed-off-by Himadri Pandya <[email protected]>--- drivers/staging/rtlwifi/phydm/phydm.c | 2 +- drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtlwifi/phydm/phydm.c +1
-1@@ -1767,7 +1767,7 @@ static u8 phydm_calculate_intf_distance(void *dm_void, u32 bw, u32 fc, int_distance = (fc >= f_interference) ? (fc - f_interference) : (f_interference - fc); tone_idx_tmp = - (int_distance <<5 );/* =10*(int_distance /0.3125) */ + int_distance <<5 ;/* =10*(int_distance /0.3125) */ ODM_RT_TRACE( dm, ODM_COMP_API, "int_distance = ((%d MHz)) Mhz, tone_idx_tmp = ((%d.%d))\n",drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +1
-2@@ -1790,7 +1790,7 @@ phydm_process_rssi_for_dm_new_type(struct phy_dm_struct *dm,if (undecorated_smoothed_pwdb <=0 ) { accumulate_pwdb = - (phy_info->rx_pwdb_all << scaling_factor); + phy_info->rx_pwdb_all << scaling_factor; undecorated_smoothed_pwdb = phy_info->rx_pwdb_all; }else { accumulate_pwdb = accumulate_pwdb - --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190309180212.54071-1-himadri18.07%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH v2 1/1 staging: rtlwifi: phydm: remove unnecessary parentheses
In reply to Himadri PandyaRemove unnecessary parentheses around the right hand side of assignment operator. Issue found using Coccinelle.
---
Changes in V2:
- Rephrase log message
--- drivers/staging/rtlwifi/phydm/phydm.c | 2 +- drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtlwifi/phydm/phydm.c +1 -1
@@ -1767,7 +1767,7 @@ static u8 phydm_calculate_intf_distance(void *dm_void, u32 bw, u32 fc, int_distance = (fc >= f_interference) ? (fc - f_interference) : (f_interference - fc); tone_idx_tmp = - (int_distance <<5 );/* =10*(int_distance /0.3125) */ + int_distance <<5 ;/* =10*(int_distance /0.3125) */ ODM_RT_TRACE( dm, ODM_COMP_API, "int_distance = ((%d MHz)) Mhz, tone_idx_tmp = ((%d.%d))\n",
drivers/staging/rtlwifi/phydm/phydm_hwconfig.c +1 -1
@@ -1790,7 +1790,7 @@ phydm_process_rssi_for_dm_new_type(struct phy_dm_struct *dm,if (undecorated_smoothed_pwdb <=0 ) { accumulate_pwdb = - (phy_info->rx_pwdb_all << scaling_factor); + phy_info->rx_pwdb_all << scaling_factor; undecorated_smoothed_pwdb = phy_info->rx_pwdb_all; }else { accumulate_pwdb = accumulate_pwdb -
Signature · 1 line
2.17.1