mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wifi: ath9k: remove unneeded variable from ath9k_dump_legacy_btcoex()
       [not found] <20230614061007.62077-1-luojianhong@cdjrlc.com>
@ 2023-06-14  6:13 ` baomingtong001
  2023-06-14  7:38   ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: baomingtong001 @ 2023-06-14  6:13 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, linux-kernel

Fix the following coccicheck warning:

drivers/net/wireless/ath/ath9k/gpio.c:501:5-8: Unneeded variable: "len".

Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
  drivers/net/wireless/ath/ath9k/gpio.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/gpio.c 
b/drivers/net/wireless/ath/ath9k/gpio.c
index b457e52dd365..f3d1bc02e633 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -498,14 +498,13 @@ static int ath9k_dump_legacy_btcoex(struct 
ath_softc *sc, u8 *buf, u32 size)
  {

      struct ath_btcoex *btcoex = &sc->btcoex;
-    u32 len = 0;

      ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type);
      ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period);
      ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle);
      ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time);

-    return len;
+    return 0;
  }

  int ath9k_dump_btcoex(struct ath_softc *sc, u8 *buf, u32 size)

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

* Re: [PATCH] wifi: ath9k: remove unneeded variable from ath9k_dump_legacy_btcoex()
  2023-06-14  6:13 ` [PATCH] wifi: ath9k: remove unneeded variable from ath9k_dump_legacy_btcoex() baomingtong001
@ 2023-06-14  7:38   ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2023-06-14  7:38 UTC (permalink / raw)
  To: baomingtong001, kvalo; +Cc: linux-wireless, linux-kernel

On Wed, 2023-06-14 at 14:13 +0800, baomingtong001@208suo.com wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/wireless/ath/ath9k/gpio.c:501:5-8: Unneeded variable: "len".
> 
> Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>

Same here. I'm even wondering if there are different people behind this?

Also, I'm wondering what you're up to - are you all training or
something? I see the same kind of patches that are the same kind of
broken from a handful of different people?

> ---
>   drivers/net/wireless/ath/ath9k/gpio.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/gpio.c 
> b/drivers/net/wireless/ath/ath9k/gpio.c
> index b457e52dd365..f3d1bc02e633 100644
> --- a/drivers/net/wireless/ath/ath9k/gpio.c
> +++ b/drivers/net/wireless/ath/ath9k/gpio.c
> @@ -498,14 +498,13 @@ static int ath9k_dump_legacy_btcoex(struct 
> ath_softc *sc, u8 *buf, u32 size)
>   {
> 
>       struct ath_btcoex *btcoex = &sc->btcoex;
> -    u32 len = 0;
> 
>       ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type);
>       ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period);
>       ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle);
>       ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time);
> 
> -    return len;
> +    return 0;
> 

This won't even build.

Please try to understand the code you're modifying before you do. And
no, build-testing it (and fixing it) will not result anything better.

johannes

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

end of thread, other threads:[~2023-06-14  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230614061007.62077-1-luojianhong@cdjrlc.com>
2023-06-14  6:13 ` [PATCH] wifi: ath9k: remove unneeded variable from ath9k_dump_legacy_btcoex() baomingtong001
2023-06-14  7:38   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®