All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] wireless: Clean up some inconsistent indenting
@ 2021-12-02  3:01 Yang Li
  2021-12-02  6:39 ` Kalle Valo
  2021-12-02 17:37 ` Brian Norris
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2021-12-02  3:01 UTC (permalink / raw)
  To: davem
  Cc: kuba, amitkarwar, ganapathi017, sharvari.harisangam,
	huxinming820, kvalo, linux-wireless, netdev, linux-kernel,
	Yang Li

Eliminate the follow smatch warnings:

drivers/net/wireless/marvell/mwifiex/pcie.c:3376
mwifiex_unregister_dev() warn: inconsistent indenting
drivers/net/wireless/marvell/mwifiex/uap_event.c:285
mwifiex_process_uap_event() warn: inconsistent indenting
drivers/net/wireless/marvell/mwifiex/sta_event.c:797
mwifiex_process_sta_event() warn: inconsistent indenting

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/net/wireless/marvell/mwifiex/pcie.c      | 2 +-
 drivers/net/wireless/marvell/mwifiex/sta_event.c | 2 +-
 drivers/net/wireless/marvell/mwifiex/uap_event.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index d5fb294..43bdcbc 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -3373,7 +3373,7 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
 	} else {
 		mwifiex_dbg(adapter, INFO,
 			    "%s(): calling free_irq()\n", __func__);
-	       free_irq(card->dev->irq, &card->share_irq_ctx);
+		free_irq(card->dev->irq, &card->share_irq_ctx);
 
 		if (card->msi_enable)
 			pci_disable_msi(pdev);
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c
index 80e5d44..9a3fbfb 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
@@ -794,7 +794,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
 					 MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET))
 						adapter->ps_state =
 							PS_STATE_SLEEP;
-					return 0;
+				return 0;
 			}
 		}
 		adapter->ps_state = PS_STATE_AWAKE;
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_event.c b/drivers/net/wireless/marvell/mwifiex/uap_event.c
index 2e25d72..e31de7a 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_event.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_event.c
@@ -282,7 +282,7 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv)
 					 MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET))
 						adapter->ps_state =
 							PS_STATE_SLEEP;
-					return 0;
+				return 0;
 			}
 		}
 		adapter->ps_state = PS_STATE_AWAKE;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] wireless: Clean up some inconsistent indenting
  2021-12-02  3:01 [PATCH -next] wireless: Clean up some inconsistent indenting Yang Li
@ 2021-12-02  6:39 ` Kalle Valo
  2021-12-02 17:37 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-12-02  6:39 UTC (permalink / raw)
  To: Yang Li
  Cc: davem, kuba, amitkarwar, ganapathi017, sharvari.harisangam,
	huxinming820, linux-wireless, netdev, linux-kernel

Yang Li <yang.lee@linux.alibaba.com> writes:

> Eliminate the follow smatch warnings:
>
> drivers/net/wireless/marvell/mwifiex/pcie.c:3376
> mwifiex_unregister_dev() warn: inconsistent indenting
> drivers/net/wireless/marvell/mwifiex/uap_event.c:285
> mwifiex_process_uap_event() warn: inconsistent indenting
> drivers/net/wireless/marvell/mwifiex/sta_event.c:797
> mwifiex_process_sta_event() warn: inconsistent indenting
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/net/wireless/marvell/mwifiex/pcie.c      | 2 +-
>  drivers/net/wireless/marvell/mwifiex/sta_event.c | 2 +-
>  drivers/net/wireless/marvell/mwifiex/uap_event.c | 2 +-

The subject prefix should be "mwifiex:", I can fix it.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] wireless: Clean up some inconsistent indenting
  2021-12-02  3:01 [PATCH -next] wireless: Clean up some inconsistent indenting Yang Li
  2021-12-02  6:39 ` Kalle Valo
@ 2021-12-02 17:37 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2021-12-02 17:37 UTC (permalink / raw)
  To: Yang Li
  Cc: davem, kuba, amitkarwar, ganapathi017, sharvari.harisangam,
	huxinming820, kvalo, linux-wireless, netdev, linux-kernel

Hi,

On Wed, Dec 1, 2021 at 7:04 PM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> Eliminate the follow smatch warnings:
>
> drivers/net/wireless/marvell/mwifiex/pcie.c:3376
> mwifiex_unregister_dev() warn: inconsistent indenting
> drivers/net/wireless/marvell/mwifiex/uap_event.c:285
> mwifiex_process_uap_event() warn: inconsistent indenting
> drivers/net/wireless/marvell/mwifiex/sta_event.c:797
> mwifiex_process_sta_event() warn: inconsistent indenting

Thanks for looking at the smatch warnings! But I think you've taken
the wrong action on two of them. See below.

> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/net/wireless/marvell/mwifiex/pcie.c      | 2 +-
>  drivers/net/wireless/marvell/mwifiex/sta_event.c | 2 +-
>  drivers/net/wireless/marvell/mwifiex/uap_event.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
> index d5fb294..43bdcbc 100644
> --- a/drivers/net/wireless/marvell/mwifiex/pcie.c
> +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
> @@ -3373,7 +3373,7 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
>         } else {
>                 mwifiex_dbg(adapter, INFO,
>                             "%s(): calling free_irq()\n", __func__);
> -              free_irq(card->dev->irq, &card->share_irq_ctx);
> +               free_irq(card->dev->irq, &card->share_irq_ctx);
>
>                 if (card->msi_enable)
>                         pci_disable_msi(pdev);
> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c
> index 80e5d44..9a3fbfb 100644
> --- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
> +++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
> @@ -794,7 +794,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
>                                          MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET))
>                                                 adapter->ps_state =
>                                                         PS_STATE_SLEEP;
> -                                       return 0;
> +                               return 0;

Hmm, I have a strong suspicion that the *indentation* was actually
correct, and your stylistic warning actually signals that the braces
are incorrect. See how the assignment to 'ps_state' is clobbered just
a few lines below; I suspect the failure to send a null packet is
supposed to mean we should exit this function immediately, and all
other cases are supposed to continue.

>                         }
>                 }
>                 adapter->ps_state = PS_STATE_AWAKE;
> diff --git a/drivers/net/wireless/marvell/mwifiex/uap_event.c b/drivers/net/wireless/marvell/mwifiex/uap_event.c
> index 2e25d72..e31de7a 100644
> --- a/drivers/net/wireless/marvell/mwifiex/uap_event.c
> +++ b/drivers/net/wireless/marvell/mwifiex/uap_event.c
> @@ -282,7 +282,7 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv)
>                                          MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET))
>                                                 adapter->ps_state =
>                                                         PS_STATE_SLEEP;
> -                                       return 0;
> +                               return 0;

Same here.

Brian

>                         }
>                 }
>                 adapter->ps_state = PS_STATE_AWAKE;
> --
> 1.8.3.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-02 17:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02  3:01 [PATCH -next] wireless: Clean up some inconsistent indenting Yang Li
2021-12-02  6:39 ` Kalle Valo
2021-12-02 17:37 ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.