All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] b43legacy: Remove unneeded variable
       [not found] <20230614075250.29097-1-zhanglibing@cdjrlc.com>
@ 2023-06-14  7:55   ` wuyonggang001
  0 siblings, 0 replies; 8+ messages in thread
From: wuyonggang001 @ 2023-06-14  7:55 UTC (permalink / raw)
  To: Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
variable: "count".

Signed-off-by: Yonggang Wu <wuyonggang001@208suo.com>
---
  drivers/net/wireless/broadcom/b43legacy/debugfs.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c 
b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
index 6b0e8d117061..184b0b4bdd94 100644
--- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
@@ -65,7 +65,6 @@ struct b43legacy_dfs_file * fops_to_dfs_file(struct 
b43legacy_wldev *dev,
  /* wl->irq_lock is locked */
  static ssize_t tsf_read_file(struct b43legacy_wldev *dev, char *buf, 
size_t bufsize)
  {
-    ssize_t count = 0;
      u64 tsf;

      b43legacy_tsf_read(dev, &tsf);
@@ -73,7 +72,7 @@ static ssize_t tsf_read_file(struct b43legacy_wldev 
*dev, char *buf, size_t bufs
          (unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
          (unsigned int)(tsf & 0xFFFFFFFFULL));

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */
@@ -91,7 +90,6 @@ static int tsf_write_file(struct b43legacy_wldev *dev, 
const char *buf, size_t c
  /* wl->irq_lock is locked */
  static ssize_t ucode_regs_read_file(struct b43legacy_wldev *dev, char 
*buf, size_t bufsize)
  {
-    ssize_t count = 0;
      int i;

      for (i = 0; i < 64; i++) {
@@ -99,7 +97,7 @@ static ssize_t ucode_regs_read_file(struct 
b43legacy_wldev *dev, char *buf, size
              b43legacy_shm_read16(dev, B43legacy_SHM_WIRELESS, i));
      }

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */
@@ -125,7 +123,6 @@ static ssize_t shm_read_file(struct b43legacy_wldev 
*dev, char *buf, size_t bufs
  static ssize_t txstat_read_file(struct b43legacy_wldev *dev, char *buf, 
size_t bufsize)
  {
      struct b43legacy_txstatus_log *log = &dev->dfsentry->txstatlog;
-    ssize_t count = 0;
      unsigned long flags;
      int i, idx;
      struct b43legacy_txstatus *stat;
@@ -166,7 +163,7 @@ static ssize_t txstat_read_file(struct 
b43legacy_wldev *dev, char *buf, size_t b
  out_unlock:
      spin_unlock_irqrestore(&log->lock, flags);

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */

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

* [PATCH] b43legacy: Remove unneeded variable
@ 2023-06-14  7:55   ` wuyonggang001
  0 siblings, 0 replies; 8+ messages in thread
From: wuyonggang001 @ 2023-06-14  7:55 UTC (permalink / raw)
  To: Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
variable: "count".

Signed-off-by: Yonggang Wu <wuyonggang001@208suo.com>
---
  drivers/net/wireless/broadcom/b43legacy/debugfs.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c 
b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
index 6b0e8d117061..184b0b4bdd94 100644
--- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
@@ -65,7 +65,6 @@ struct b43legacy_dfs_file * fops_to_dfs_file(struct 
b43legacy_wldev *dev,
  /* wl->irq_lock is locked */
  static ssize_t tsf_read_file(struct b43legacy_wldev *dev, char *buf, 
size_t bufsize)
  {
-    ssize_t count = 0;
      u64 tsf;

      b43legacy_tsf_read(dev, &tsf);
@@ -73,7 +72,7 @@ static ssize_t tsf_read_file(struct b43legacy_wldev 
*dev, char *buf, size_t bufs
          (unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
          (unsigned int)(tsf & 0xFFFFFFFFULL));

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */
@@ -91,7 +90,6 @@ static int tsf_write_file(struct b43legacy_wldev *dev, 
const char *buf, size_t c
  /* wl->irq_lock is locked */
  static ssize_t ucode_regs_read_file(struct b43legacy_wldev *dev, char 
*buf, size_t bufsize)
  {
-    ssize_t count = 0;
      int i;

      for (i = 0; i < 64; i++) {
@@ -99,7 +97,7 @@ static ssize_t ucode_regs_read_file(struct 
b43legacy_wldev *dev, char *buf, size
              b43legacy_shm_read16(dev, B43legacy_SHM_WIRELESS, i));
      }

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */
@@ -125,7 +123,6 @@ static ssize_t shm_read_file(struct b43legacy_wldev 
*dev, char *buf, size_t bufs
  static ssize_t txstat_read_file(struct b43legacy_wldev *dev, char *buf, 
size_t bufsize)
  {
      struct b43legacy_txstatus_log *log = &dev->dfsentry->txstatlog;
-    ssize_t count = 0;
      unsigned long flags;
      int i, idx;
      struct b43legacy_txstatus *stat;
@@ -166,7 +163,7 @@ static ssize_t txstat_read_file(struct 
b43legacy_wldev *dev, char *buf, size_t b
  out_unlock:
      spin_unlock_irqrestore(&log->lock, flags);

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */

_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

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

* Re: [PATCH] b43legacy: Remove unneeded variable
  2023-06-14  7:55   ` wuyonggang001
@ 2023-06-14  8:02     ` Johannes Berg
  -1 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2023-06-14  8:02 UTC (permalink / raw)
  To: wuyonggang001, Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

On Wed, 2023-06-14 at 15:55 +0800, wuyonggang001@208suo.com wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
> variable: "count".

Hey, no. Please stop it already. This won't even _compile_. Just don't.
There's really not much value in cleaning up those coccicheck warnings
in the first place. You're just wasting everyone's time (including your
own).

johannes

_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

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

* Re: [PATCH] b43legacy: Remove unneeded variable
@ 2023-06-14  8:02     ` Johannes Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2023-06-14  8:02 UTC (permalink / raw)
  To: wuyonggang001, Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

On Wed, 2023-06-14 at 15:55 +0800, wuyonggang001@208suo.com wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
> variable: "count".

Hey, no. Please stop it already. This won't even _compile_. Just don't.
There's really not much value in cleaning up those coccicheck warnings
in the first place. You're just wasting everyone's time (including your
own).

johannes

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

* Re: [PATCH] b43legacy: Remove unneeded variable
  2023-06-14  8:02     ` Johannes Berg
@ 2023-06-14  8:16       ` Johannes Berg
  -1 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2023-06-14  8:16 UTC (permalink / raw)
  To: wuyonggang001, Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

On Wed, 2023-06-14 at 10:02 +0200, Johannes Berg wrote:
> On Wed, 2023-06-14 at 15:55 +0800, wuyonggang001@208suo.com wrote:
> > Fix the following coccicheck warning:
> > 
> > drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
> > variable: "count".
> 
> Hey, no. Please stop it already. This won't even _compile_. Just don't.
> There's really not much value in cleaning up those coccicheck warnings
> in the first place. You're just wasting everyone's time (including your
> own).

And BTW, I've just looked at all your other contributions to other areas
of the kernel, and heard from others as well - not doing any better!

I can only suggest that you stop all of your patch submissions and re-
evaluate what you're even trying to do. And not just you personally, but
all of the @208suo.com folks who popped up recently.

johannes

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

* Re: [PATCH] b43legacy: Remove unneeded variable
@ 2023-06-14  8:16       ` Johannes Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2023-06-14  8:16 UTC (permalink / raw)
  To: wuyonggang001, Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

On Wed, 2023-06-14 at 10:02 +0200, Johannes Berg wrote:
> On Wed, 2023-06-14 at 15:55 +0800, wuyonggang001@208suo.com wrote:
> > Fix the following coccicheck warning:
> > 
> > drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
> > variable: "count".
> 
> Hey, no. Please stop it already. This won't even _compile_. Just don't.
> There's really not much value in cleaning up those coccicheck warnings
> in the first place. You're just wasting everyone's time (including your
> own).

And BTW, I've just looked at all your other contributions to other areas
of the kernel, and heard from others as well - not doing any better!

I can only suggest that you stop all of your patch submissions and re-
evaluate what you're even trying to do. And not just you personally, but
all of the @208suo.com folks who popped up recently.

johannes

_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

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

* Re: [PATCH] b43legacy: Remove unneeded variable
  2023-06-14  5:52     ` wuyonggang001
@ 2023-06-14  7:33       ` Johannes Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2023-06-14  7:33 UTC (permalink / raw)
  To: wuyonggang001, Larry.Finger, kvalo; +Cc: linux-wireless, linux-kernel

On Wed, 2023-06-14 at 13:52 +0800, wuyonggang001@208suo.com wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
> variable: "count".

That may be a warning that it gives.

> Signed-off-by: Yonggang Wu <wuyonggang001@208suo.com>
> ---
>   drivers/net/wireless/broadcom/b43legacy/debugfs.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c 
> b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
> index 6b0e8d117061..55a067eaa52d 100644
> --- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
> +++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
> @@ -73,7 +73,7 @@ static ssize_t tsf_read_file(struct b43legacy_wldev 
> *dev, char *buf, size_t bufs
>           (unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
>           (unsigned int)(tsf & 0xFFFFFFFFULL));
> 
> -    return count;
> +    return 0;
> 

However, that doesn't even fix the warning, and it is actually also
completely wrong.

Please don't submit patches where you don't even understand the code.

johannes

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

* [PATCH] b43legacy: Remove unneeded variable
       [not found]   ` <e598894f5a32c00ff905b010bd8e286f@208suo.com>
@ 2023-06-14  5:52     ` wuyonggang001
  2023-06-14  7:33       ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: wuyonggang001 @ 2023-06-14  5:52 UTC (permalink / raw)
  To: Larry.Finger, kvalo; +Cc: linux-wireless, linux-kernel

Fix the following coccicheck warning:

drivers/net/wireless/broadcom/b43legacy/debugfs.c:68:9-14: Unneeded 
variable: "count".

Signed-off-by: Yonggang Wu <wuyonggang001@208suo.com>
---
  drivers/net/wireless/broadcom/b43legacy/debugfs.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43legacy/debugfs.c 
b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
index 6b0e8d117061..55a067eaa52d 100644
--- a/drivers/net/wireless/broadcom/b43legacy/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43legacy/debugfs.c
@@ -73,7 +73,7 @@ static ssize_t tsf_read_file(struct b43legacy_wldev 
*dev, char *buf, size_t bufs
          (unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
          (unsigned int)(tsf & 0xFFFFFFFFULL));

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */
@@ -99,7 +99,7 @@ static ssize_t ucode_regs_read_file(struct 
b43legacy_wldev *dev, char *buf, size
              b43legacy_shm_read16(dev, B43legacy_SHM_WIRELESS, i));
      }

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */
@@ -166,7 +166,7 @@ static ssize_t txstat_read_file(struct 
b43legacy_wldev *dev, char *buf, size_t b
  out_unlock:
      spin_unlock_irqrestore(&log->lock, flags);

-    return count;
+    return 0;
  }

  /* wl->irq_lock is locked */

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230614075250.29097-1-zhanglibing@cdjrlc.com>
2023-06-14  7:55 ` [PATCH] b43legacy: Remove unneeded variable wuyonggang001
2023-06-14  7:55   ` wuyonggang001
2023-06-14  8:02   ` Johannes Berg
2023-06-14  8:02     ` Johannes Berg
2023-06-14  8:16     ` Johannes Berg
2023-06-14  8:16       ` Johannes Berg
     [not found] <20230612044742.58785-1-zhanglibing@cdjrlc.com>
     [not found] ` <2caa7e16691b9cecab28aec323785a35@208suo.com>
     [not found]   ` <e598894f5a32c00ff905b010bd8e286f@208suo.com>
2023-06-14  5:52     ` wuyonggang001
2023-06-14  7:33       ` Johannes Berg

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.