Re: [PATCH] mwifiex: clean up some inconsistent indenting

From: Jeff Johnson
Date: Fri Nov 10 2023 - 19:39:14 EST


On 11/10/2023 12:33 AM, Jiapeng Chong wrote:
> No functional modification involved.
>
> drivers/net/wireless/marvell/mwifiex/sta_event.c:789 mwifiex_process_sta_event() warn: inconsistent indenting.
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7226
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
> ---
> drivers/net/wireless/marvell/mwifiex/sta_event.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c
> index df9cdd10a494..9dd3b6d71026 100644
> --- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
> +++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
> @@ -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

> 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))) {

same thing here

> adapter->ps_state = PS_STATE_AWAKE;
> adapter->pm_wakeup_card_req = false;
> adapter->pm_wakeup_fw_try = false;