drivers: net: wireless: rtlwifi: fix bool comparison in expressions
PATCH 1/1 drivers: net: wireless: rtlwifi: fix bool comparison in expressions
There are certain conditional expressions in rtlwifi, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c,
"if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)"
Replace all such expressions with the bool variables appropriately
---
- The changes made are compile tested
- Applies perfecly on next-20210108
drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-)
drivers/net/wireless/realtek/rtlwifi/ps.c +2 -2
@@ -798,9 +798,9 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ie +=3 + noa_len; } -if (find_p2p_ie == true) { +if (find_p2p_ie) {if ((p2pinfo->p2p_ps_mode >P2P_PS_NONE ) && - (find_p2p_ps_ie == false)) + (!find_p2p_ps_ie))rtl_p2p_ps_cmd (hw,P2P_PS_DISABLE ); } }
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c +4 -4
@@ -474,11 +474,11 @@ static void rtl88e_dm_dig(struct ieee80211_hw *hw)u8 dm_dig_max, dm_dig_min;u8 current_igi = dm_dig->cur_igvalue; -if (rtlpriv->dm.dm_initialgain_enable == false) +if (!rtlpriv->dm.dm_initialgain_enable)return ; -if (dm_dig->dig_enable_flag == false) +if (!dm_dig->dig_enable_flag)return ; -if (mac->act_scanning == true) +if (mac->act_scanning)return ;if (mac->link_state >=MAC80211_LINKED )
@@ -1637,7 +1637,7 @@ static void rtl88e_dm_fast_ant_training(struct ieee80211_hw *hw) } } -if (bpkt_filter_match == false) { +if (!bpkt_filter_match) {rtl_set_bbreg (hw,DM_REG_TXAGC_A_1_MCS32_11N ,BIT (16 ),0 );rtl_set_bbreg (hw,DM_REG_IGI_A_11N ,BIT (7 ),0 );
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c +2 -2
@@ -1269,12 +1269,12 @@ void rtl88ee_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)if (rtlpriv->psc.rfpwr_state !=ERFON )return ; -if (check_bssid == true) { +if (check_bssid) { reg_rcr |= (RCR_CBSSID_DATA |RCR_CBSSID_BCN ); rtlpriv->cfg->ops->set_hw_reg (hw,HW_VAR_RCR , (u8 *)(®_rcr));_rtl88ee_set_bcn_ctrl_reg (hw,0 ,BIT (4 )); - }else if (check_bssid == false) { + }else if (!check_bssid) { reg_rcr &= (~(RCR_CBSSID_DATA |RCR_CBSSID_BCN ));_rtl88ee_set_bcn_ctrl_reg (hw,BIT (4 ),0 ); rtlpriv->cfg->ops->set_hw_reg(hw,
drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c +2 -2
@@ -380,7 +380,7 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw) initialized = false; dm_digtable->dig_ext_port_stage =DIG_EXT_PORT_STAGE_MAX ;return ; - }else if (initialized == false) { + }else if (!initialized) { initialized = true; dm_digtable->dig_ext_port_stage =DIG_EXT_PORT_STAGE_0 ; dm_digtable->cur_igvalue =0x20 ;
@@ -509,7 +509,7 @@ static void rtl92c_dm_dig(struct ieee80211_hw *hw) {struct rtl_priv *rtlpriv =rtl_priv (hw); -if (rtlpriv->dm.dm_initialgain_enable == false) +if (!rtlpriv->dm.dm_initialgain_enable)return ;if (!(rtlpriv->dm.dm_flag &DYNAMIC_FUNC_DIG ))return ;
drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c +2 -2
@@ -458,7 +458,7 @@ static u8 _rtl92se_halset_sysclk(struct ieee80211_hw *hw, u8 data) tmpvalue =rtl_read_byte (rtlpriv,SYS_CLKR +1 ); bresult = ((tmpvalue &BIT (7 )) == (data &BIT (7 ))); -if ((data & (BIT (6 ) |BIT (7 ))) == false) { +if (!(data & (BIT (6 ) |BIT (7 )))) { waitcount =100 ; tmpvalue =0 ;
@@ -1268,7 +1268,7 @@ static u8 _rtl92s_set_sysclk(struct ieee80211_hw *hw, u8 data) tmp =rtl_read_byte (rtlpriv,SYS_CLKR +1 ); result = ((tmp &BIT (7 )) == (data &BIT (7 ))); -if ((data & (BIT (6 ) |BIT (7 ))) == false) { +if (!(data & (BIT (6 ) |BIT (7 )))) { waitcnt =100 ; tmp =0 ;
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +4 -4
@@ -1812,7 +1812,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)return false; }_rtl8821ae_phy_init_tx_power_by_rate (hw); -if (rtlefuse->autoload_failflag == false) { +if (!rtlefuse->autoload_failflag) { rtstatus =_rtl8821ae_phy_config_bb_with_pgheaderfile (hw,BASEBAND_CONFIG_PHY_REG ); }
@@ -3980,7 +3980,7 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path) } } -if (tx0iqkok == false) +if (!tx0iqkok)break ;/* TXK fail, Don't do RXK */ if (vdf_enable ==1 ) {
@@ -4090,7 +4090,7 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path) } } -if (tx0iqkok == false) {/* If RX mode TXK fail, then take TXK Result */ +if (!tx0iqkok) {/* If RX mode TXK fail, then take TXK Result */ tx_x0_rxk[cal] = tx_x0[cal]; tx_y0_rxk[cal] = tx_y0[cal]; tx0iqkok = true;
@@ -4249,7 +4249,7 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path) } } -if (tx0iqkok == false) {/* If RX mode TXK fail, then take TXK Result */ +if (!tx0iqkok) {/* If RX mode TXK fail, then take TXK Result */ tx_x0_rxk[cal] = tx_x0[cal]; tx_y0_rxk[cal] = tx_y0[cal]; tx0iqkok = true;
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 16 lines · Aditya Srivastava
There are certain conditional expressions in rtlwifi, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:
BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/falseE.g., in
drivers/net/wireless/realtek/rtlwifi/ps.c,
"if (find_p2p_ie== true)" can be replaced with "if (find_p2p_ie)"Replace all such expressions with the bool variables appropriately
Signed-off-by Aditya Srivastava<[email protected]>---
- The changes made are compile tested
- Applies perfecly on next-20210108
Quoted 7 lines
drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-)
As has been stated several times, this form of the subject is incorrect. It should be: "rtlwifi: <driver_name>: <subject>
I would prefer that there be separate patches for each driver, not that the changes be lumped into a single patch as was done here. Such organization makes it a lot easier to find the patches for a given driver in case something goes wrong.Note: The driver for ps is rtl_pci, and that for rtl8192c is rtl8192c-common. The other driver names match their directory.
Larry
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
cover rtlwifi: fix bool comparison in expressions
This patch series fixes the bool comparison in conditional expressions for all the drivers in rtlwifi.
There are certain conditional expressions in rtlwifi drivers, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK: BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c, "if (mac->act_scanning == true)" can be replaced with "if (mac->act_scanning)"
Fix all such expressions with the bool variables appropriately for all the drivers in rtlwifi
* The changes made are compile tested.
* The patches apply perfectly on next-20210108
Aditya Srivastava (5):
rtlwifi: rtl_pci: fix bool comparison in expressions
rtlwifi: rtl8192c-common: fix bool comparison in expressions
rtlwifi: rtl8188ee: fix bool comparison in expressions
rtlwifi: rtl8192se: fix bool comparison in expressions
rtlwifi: rtl8821ae: fix bool comparison in expressions
drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-)
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH 1/5 rtlwifi: rtl_pci: fix bool comparison in expressions
There are certain conditional expressions in rtl_pci, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c,
"if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)"
Replace all such expressions with the bool variables appropriately
--- drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/ps.c +2 -2
@@ -798,9 +798,9 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ie +=3 + noa_len; } -if (find_p2p_ie == true) { +if (find_p2p_ie) {if ((p2pinfo->p2p_ps_mode >P2P_PS_NONE ) && - (find_p2p_ps_ie == false)) + (!find_p2p_ps_ie))rtl_p2p_ps_cmd (hw,P2P_PS_DISABLE ); } }
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [PATCH 1/5] rtlwifi: rtl_pci: fix bool comparison in expressions
Quoted 6 lines · Aditya Srivastava
There are certain conditional expressions in
rtl_pci, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
Quoted 6 lines
E.g., in
drivers/net/wireless/realtek/rtlwifi/ps.c,
"if (find_p2p_ie== true)" can be replaced with "if (find_p2p_ie)"Replace all such expressions with the bool variables appropriately
Signed-off-by Aditya Srivastava <[email protected]>
5 patches applied to wireless-drivers-next.git, thanks.
d8cbaa3de403 rtlwifi: rtl_pci: fix bool comparison in expressions f7c76283fc5f rtlwifi: rtl8192c-common: fix bool comparison in expressions 64338f0dfd6a rtlwifi: rtl8188ee: fix bool comparison in expressions 33ae4623d544 rtlwifi: rtl8192se: fix bool comparison in expressions 9264cabc1204 rtlwifi: rtl8821ae: fix bool comparison in expressions
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [Linux-kernel-mentees] [PATCH 1/5] rtlwifi: rtl_pci: fix bool comparison in expressions
In reply to Aditya SrivastavaQuoted 6 lines · Aditya Srivastava
There are certain conditional expressions in
rtl_pci, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
Quoted 6 lines
E.g., in
drivers/net/wireless/realtek/rtlwifi/ps.c,
"if (find_p2p_ie== true)" can be replaced with "if (find_p2p_ie)"Replace all such expressions with the bool variables appropriately
Signed-off-by Aditya Srivastava <[email protected]>
5 patches applied to wireless-drivers-next.git, thanks.
d8cbaa3de403 rtlwifi: rtl_pci: fix bool comparison in expressions f7c76283fc5f rtlwifi: rtl8192c-common: fix bool comparison in expressions 64338f0dfd6a rtlwifi: rtl8188ee: fix bool comparison in expressions 33ae4623d544 rtlwifi: rtl8192se: fix bool comparison in expressions 9264cabc1204 rtlwifi: rtl8821ae: fix bool comparison in expressions
Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH 2/5 rtlwifi: rtl8192c-common: fix bool comparison in expressions
In reply to Aditya SrivastavaThere are certain conditional expressions in rtl8192c-common, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK: BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c, "else if (initialized == false) {" can be replaced with "else if (!initialized) {"
Replace all such expressions with the bool variables appropriately
--- drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c +2 -2
@@ -380,7 +380,7 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw) initialized = false; dm_digtable->dig_ext_port_stage =DIG_EXT_PORT_STAGE_MAX ;return ; - }else if (initialized == false) { + }else if (!initialized) { initialized = true; dm_digtable->dig_ext_port_stage =DIG_EXT_PORT_STAGE_0 ; dm_digtable->cur_igvalue =0x20 ;
@@ -509,7 +509,7 @@ static void rtl92c_dm_dig(struct ieee80211_hw *hw) {struct rtl_priv *rtlpriv =rtl_priv (hw); -if (rtlpriv->dm.dm_initialgain_enable == false) +if (!rtlpriv->dm.dm_initialgain_enable)return ;if (!(rtlpriv->dm.dm_flag &DYNAMIC_FUNC_DIG ))return ;
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH 3/5 rtlwifi: rtl8188ee: fix bool comparison in expressions
In reply to Aditya SrivastavaThere are certain conditional expressions in rtl8188ee, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c, "if (mac->act_scanning == true)" can be replaced with "if (mac->act_scanning)"
Replace all such expressions with the bool variables appropriately
--- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c +4 -4
@@ -474,11 +474,11 @@ static void rtl88e_dm_dig(struct ieee80211_hw *hw)u8 dm_dig_max, dm_dig_min;u8 current_igi = dm_dig->cur_igvalue; -if (rtlpriv->dm.dm_initialgain_enable == false) +if (!rtlpriv->dm.dm_initialgain_enable)return ; -if (dm_dig->dig_enable_flag == false) +if (!dm_dig->dig_enable_flag)return ; -if (mac->act_scanning == true) +if (mac->act_scanning)return ;if (mac->link_state >=MAC80211_LINKED )
@@ -1637,7 +1637,7 @@ static void rtl88e_dm_fast_ant_training(struct ieee80211_hw *hw) } } -if (bpkt_filter_match == false) { +if (!bpkt_filter_match) {rtl_set_bbreg (hw,DM_REG_TXAGC_A_1_MCS32_11N ,BIT (16 ),0 );rtl_set_bbreg (hw,DM_REG_IGI_A_11N ,BIT (7 ),0 );
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c +2 -2
@@ -1269,12 +1269,12 @@ void rtl88ee_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)if (rtlpriv->psc.rfpwr_state !=ERFON )return ; -if (check_bssid == true) { +if (check_bssid) { reg_rcr |= (RCR_CBSSID_DATA |RCR_CBSSID_BCN ); rtlpriv->cfg->ops->set_hw_reg (hw,HW_VAR_RCR , (u8 *)(®_rcr));_rtl88ee_set_bcn_ctrl_reg (hw,0 ,BIT (4 )); - }else if (check_bssid == false) { + }else if (!check_bssid) { reg_rcr &= (~(RCR_CBSSID_DATA |RCR_CBSSID_BCN ));_rtl88ee_set_bcn_ctrl_reg (hw,BIT (4 ),0 ); rtlpriv->cfg->ops->set_hw_reg(hw,
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH 4/5 rtlwifi: rtl8192se: fix bool comparison in expressions
In reply to Aditya SrivastavaThere are certain conditional expressions in rtl8192se, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
Replace all such expressions with the bool variables appropriately
--- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c +2 -2
@@ -458,7 +458,7 @@ static u8 _rtl92se_halset_sysclk(struct ieee80211_hw *hw, u8 data) tmpvalue =rtl_read_byte (rtlpriv,SYS_CLKR +1 ); bresult = ((tmpvalue &BIT (7 )) == (data &BIT (7 ))); -if ((data & (BIT (6 ) |BIT (7 ))) == false) { +if (!(data & (BIT (6 ) |BIT (7 )))) { waitcount =100 ; tmpvalue =0 ;
@@ -1268,7 +1268,7 @@ static u8 _rtl92s_set_sysclk(struct ieee80211_hw *hw, u8 data) tmp =rtl_read_byte (rtlpriv,SYS_CLKR +1 ); result = ((tmp &BIT (7 )) == (data &BIT (7 ))); -if ((data & (BIT (6 ) |BIT (7 ))) == false) { +if (!(data & (BIT (6 ) |BIT (7 )))) { waitcnt =100 ; tmp =0 ;
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH 5/5 rtlwifi: rtl8821ae: fix bool comparison in expressions
In reply to Aditya SrivastavaThere are certain conditional expressions in rtl8821ae, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false
E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c, "if (rtlefuse->autoload_failflag == false)" can be replaced with "if (!rtlefuse->autoload_failflag)"
Replace all such expressions with the bool variables appropriately
--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +4 -4
@@ -1812,7 +1812,7 @@ static bool _rtl8821ae_phy_bb8821a_config_parafile(struct ieee80211_hw *hw)return false; }_rtl8821ae_phy_init_tx_power_by_rate (hw); -if (rtlefuse->autoload_failflag == false) { +if (!rtlefuse->autoload_failflag) { rtstatus =_rtl8821ae_phy_config_bb_with_pgheaderfile (hw,BASEBAND_CONFIG_PHY_REG ); }
@@ -3980,7 +3980,7 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path) } } -if (tx0iqkok == false) +if (!tx0iqkok)break ;/* TXK fail, Don't do RXK */ if (vdf_enable ==1 ) {
@@ -4090,7 +4090,7 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path) } } -if (tx0iqkok == false) {/* If RX mode TXK fail, then take TXK Result */ +if (!tx0iqkok) {/* If RX mode TXK fail, then take TXK Result */ tx_x0_rxk[cal] = tx_x0[cal]; tx_y0_rxk[cal] = tx_y0[cal]; tx0iqkok = true;
@@ -4249,7 +4249,7 @@ static void _rtl8821ae_iqk_tx(struct ieee80211_hw *hw, enum radio_path path) } } -if (tx0iqkok == false) {/* If RX mode TXK fail, then take TXK Result */ +if (!tx0iqkok) {/* If RX mode TXK fail, then take TXK Result */ tx_x0_rxk[cal] = tx_x0[cal]; tx_y0_rxk[cal] = tx_y0[cal]; tx0iqkok = true;
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 30 lines · Larry Finger
Quoted 24 lines · Aditya Srivastava
There are certain conditional expressions in rtlwifi, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK:
BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/falseE.g., in
drivers/net/wireless/realtek/rtlwifi/ps.c,
"if (find_p2p_ie== true)" can be replaced with "if (find_p2p_ie)"Replace all such expressions with the bool variables appropriately
Signed-off-by Aditya Srivastava<[email protected]>---
- The changes made are compile tested
- Applies perfecly on next-20210108drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 8
++++----
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 ++--drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c| 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 8
++++----Quoted 1 line
6 files changed, 16 insertions(+), 16 deletions(-)As has been stated several times, this form of the subject is incorrect. It should be: "rtlwifi: <
driver_name>: <subject>
Quoted 9 lines
I would prefer that there be separate patches for each driver, not that the changes be lumped into a single patch as was done here. Such organization makes it a lot easier to find the patches for a given driver in case something goes wrong.Note: The driver for ps is
rtl_pci, and that for rtl8192c is rtl8192c-common. The other driver names match their directory.Larry
Hi Larry!
I sent the modified patches as patch series separately. I probably missed CCing you :/
The patch series can be found at:
https://lore.kernel.org/linux-wireless/[email protected]/#t
Please review :)
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees