staging: rtlwifi: phydm: Simplify expressions
v6 cover staging: rtlwifi: phydm: Simplify expressions
Simplify expressions to make code more readable.
Nishka Dasgupta (2):
staging: rtlwifi: phydm: Move operator to left hand side
staging: rtlwifi: phydm: Move function arguments to previous line
drivers/staging/rtlwifi/phydm/phydm_debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
Signature · 4 lines
Changes in v6: - Split the patch into two. 2.19.1
PATCH v6 1/2 staging: rtlwifi: phydm: Move operator to left hand side
Simplify expressions from status = status & <expression> to status &= <expression> to make the code more readable.
--- drivers/staging/rtlwifi/phydm/phydm_debug.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtlwifi/phydm/phydm_debug.c +2 -4
@@ -51,16 +51,14 @@ static inline void phydm_check_dmval_txagc(struct phy_dm_struct *dm, u32 used, (power_index <<16 ) | (power_index <<8 ) | (power_index);for (i =0 ; i <ODM_RATEVHTSS2MCS9 ; i +=4 ) - status = status & -phydm_api_set_txagc ( + status &=phydm_api_set_txagc ( dm, power_index, (enum odm_rf_radio_path ) dm_value[1 ], i, false); }else if (dm->support_ic_type &ODM_RTL8197F ) {for (i =0 ; i <=ODM_RATEMCS15 ; i++) - status = status & - phydm_api_set_txagc( + status &= phydm_api_set_txagc( dm, power_index, (enum odm_rf_radio_path) dm_value[1],
Signature · 1 line
2.19.1
PATCH v6 2/2 staging: rtlwifi: phydm: Move function arguments to previous line
In reply to Nishka DasguptaMove function arguments to previous line to solve Checkpatch warning "Line should not end with a '('".
--- drivers/staging/rtlwifi/phydm/phydm_debug.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtlwifi/phydm/phydm_debug.c +2 -4
@@ -51,15 +51,13 @@ static inline void phydm_check_dmval_txagc(struct phy_dm_struct *dm, u32 used, (power_index <<16 ) | (power_index <<8 ) | (power_index);for (i =0 ; i <ODM_RATEVHTSS2MCS9 ; i +=4 ) - status &=phydm_api_set_txagc ( - dm, power_index, + status &=phydm_api_set_txagc (dm, power_index, (enum odm_rf_radio_path ) dm_value[1 ], i, false); }else if (dm->support_ic_type &ODM_RTL8197F ) {for (i =0 ; i <=ODM_RATEMCS15 ; i++) - status &=phydm_api_set_txagc ( - dm, power_index, + status &=phydm_api_set_txagc (dm, power_index, (enum odm_rf_radio_path ) dm_value[1 ], i, false);
Signature · 1 line
2.19.1
Quoted 5 lines · Nishka Dasgupta' via outreachy-kernel
Simplify expressions to make code more readable.
Nishka Dasgupta (2):
staging: rtlwifi: phydm: Move operator to left hand side
staging: rtlwifi: phydm: Move function arguments to previous line
So the one removing the parentheses was already applied?
julia
Quoted 17 lines
drivers/staging/rtlwifi/phydm/phydm_debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)--
Changes in v6:
- Split the patch into two.2.19.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/cover.1553974929.git.nishka.dasgupta%40yahoo.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 11 lines · Julia Lawall
Quoted 5 lines · Nishka Dasgupta' via outreachy-kernel
Simplify expressions to make code more readable.
Nishka Dasgupta (2):
staging: rtlwifi: phydm: Move operator to left hand side
staging: rtlwifi: phydm: Move function arguments to previous lineSo the one removing the parentheses was already applied?
Yes, it was.
- Nishka
Quoted 34 lines
julia
Quoted 4 lines
drivers/staging/rtlwifi/phydm/phydm_debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)Quoted 8 lines
--
Changes in v6:
- Split the patch into two.2.19.1
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
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/cover.1553974929.git.nishka.dasgupta%40yahoo.com.
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.
--
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/alpine.DEB.2.21.1903302112460.2608%40hadrien. For more options, visit https://groups.google.com/d/optout.
Signature · 4 lines
*Nishka Dasgupta* *B.Sc in Computer Science, Ashoka University* *ASP Class of 2019, Ashoka University*