mwifiex: clean up some inconsistent indenting
PATCH 1/1 mwifiex: clean up some inconsistent indenting
No functional modification involved.
drivers/net/wireless/marvell/mwifiex/sta_event.c:789 mwifiex_process_sta_event() warn: inconsistent indenting.
--- drivers/net/wireless/marvell/mwifiex/sta_event.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/net/wireless/marvell/mwifiex/sta_event.c +6 -8
@@ -762,7 +762,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)mwifiex_dbg (adapter,EVENT ,"info: EVENT: AWAKE\n" );if (!adapter->pps_uapsd_mode && (priv->port_open || - (priv->bss_mode ==NL80211_IFTYPE_ADHOC )) && + (priv->bss_mode ==NL80211_IFTYPE_ADHOC )) && priv->media_connected && adapter->sleep_period.period) { adapter->pps_uapsd_mode = true; mwifiex_dbg(adapter, EVENT,
@@ -773,7 +773,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)if (mwifiex_check_last_packet_indication (priv)) {if (adapter->data_sent || (adapter->if_ops.is_port_ready && - !adapter->if_ops.is_port_ready (priv))) { + !adapter->if_ops.is_port_ready (priv))) { adapter->ps_state =PS_STATE_AWAKE ; adapter->pm_wakeup_card_req = false; adapter->pm_wakeup_fw_try = false;
@@ -781,12 +781,10 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)break ; }if (!mwifiex_send_null_packet - (priv, - MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET | - MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET)) - adapter->ps_state = -PS_STATE_SLEEP ; -return 0 ; + (priv, MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET | + MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET)) + adapter->ps_state =PS_STATE_SLEEP ; +return 0 ; } } adapter->ps_state =PS_STATE_AWAKE ;
Signature · 1 line
2.20.1.7.g153144c
Quoted 3 lines · Jiapeng Chong
No functional modification involved.
drivers/net/wireless/marvell/mwifiex/sta_event.c:789mwifiex_process_sta_event()warn: inconsistent indenting.
OK, sure ...
Quoted 11 lines
+++
b/drivers/net/wireless/marvell/mwifiex/sta_event.cdrivers/net/wireless/marvell/mwifiex/sta_event.c +1
-1@@ -762,7 +762,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)mwifiex_dbg (adapter,EVENT ,"info: EVENT: AWAKE\n" );if (!adapter->pps_uapsd_mode && (priv->port_open || - (priv->bss_mode ==NL80211_IFTYPE_ADHOC )) && + (priv->bss_mode ==NL80211_IFTYPE_ADHOC )) && priv->media_connected && adapter->sleep_period.period) { adapter->pps_uapsd_mode = true; mwifiex_dbg(adapter, EVENT,
drivers/net/wireless/marvell/mwifiex/sta_event.c int mwifiex_process_sta_event(struct mwifiex_private *priv) · line 779
Quoted 8 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +1
-1@@ -773,7 +773,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)if (mwifiex_check_last_packet_indication (priv)) {if (adapter->data_sent || (adapter->if_ops.is_port_ready && - !adapter->if_ops.is_port_ready (priv))) { + !adapter->if_ops.is_port_ready (priv))) { adapter->ps_state =PS_STATE_AWAKE ; adapter->pm_wakeup_card_req = false; adapter->pm_wakeup_fw_try = false;
Seems fine.
Quoted 5 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +0
-1@@ -781,12 +781,10 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)break ; } if (!mwifiex_send_null_packet - (priv,
drivers/net/wireless/marvell/mwifiex/sta_event.c int mwifiex_process_sta_event(struct mwifiex_private *priv) · line 788
Quoted 10 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +4
-5- MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET | - MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET)) - adapter->ps_state = -PS_STATE_SLEEP ; -return 0 ; + (priv, MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET | + MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET)) + adapter->ps_state = PS_STATE_SLEEP; +return 0 ;
🤷♀️️
That's not really an improvement is it? You've just indented the function arguments as if they were part another part of the condition? I mean, sure, it was awful - but ... maybe better break the 80 cols rule (which isn't one any more anyway)?
johannes
Quoted 16 lines · Jiapeng Chong
No functional modification involved.
drivers/net/wireless/marvell/mwifiex/sta_event.c:789mwifiex_process_sta_event()warn: inconsistent indenting.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/wireless/marvell/mwifiex/sta_event.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)drivers/net/wireless/marvell/mwifiex/sta_event.c +0
-0
drivers/net/wireless/marvell/mwifiex/sta_event.c int mwifiex_process_sta_event(struct mwifiex_private *priv) · line 765
Quoted 5 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +1
-1@@ -762,7 +762,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)mwifiex_dbg (adapter,EVENT ,"info: EVENT: AWAKE\n" ); if (!adapter->pps_uapsd_mode && (priv->port_open || - (priv->bss_mode == NL80211_IFTYPE_ADHOC)) && + (priv->bss_mode == NL80211_IFTYPE_ADHOC)) &&
this change looks incorrect to me
this condition is *inside* the parenthesis from the beginning of the previous line, and hence this should align after that parenthesis, not with that parenthesis, which is what the existing code is doing
drivers/net/wireless/marvell/mwifiex/sta_event.c int mwifiex_process_sta_event(struct mwifiex_private *priv) · line 776
Quoted 9 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +1
-1priv->media_connected && adapter->sleep_period.period) { adapter->pps_uapsd_mode = true; mwifiex_dbg(adapter, EVENT,@@ -773,7 +773,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)if (mwifiex_check_last_packet_indication (priv)) {if (adapter->data_sent || (adapter->if_ops.is_port_ready && - !adapter->if_ops.is_port_ready (priv))) { + !adapter->if_ops.is_port_ready (priv))) {
same thing here
Quoted 3 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +0
-0adapter->ps_state =PS_STATE_AWAKE ; adapter->pm_wakeup_card_req = false; adapter->pm_wakeup_fw_try = false;
Quoted 4 lines · Jeff Johnson
Quoted 3 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c:789mwifiex_process_sta_event()warn: inconsistent indenting.Reported-by Abaci Robot <[email protected]>
Quoted 9 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c int mwifiex_process_sta_event(struct mwifiex_private *priv) · line 765
Quoted 4 lines
drivers/net/wireless/marvell/mwifiex/sta_event.c +1
-1if (!adapter->pps_uapsd_mode && (priv->port_open || - (priv->bss_mode == NL80211_IFTYPE_ADHOC)) && + (priv->bss_mode == NL80211_IFTYPE_ADHOC)) &&this change looks incorrect to me
this condition is *inside* the parenthesis from the beginning of the previous line, and hence this should align after that parenthesis, not with that parenthesis, which is what the existing code is doing
Hah, you're right, I completely missed that! I guess someone should fix their tools :)
johannes