Skip to contentSkip to conversation

b43legacy: Remove unneeded variable

PATCH In review [email protected] 2 participants 2 messages Jun 14, 2023 3 messages not in the archive B43LEGACY wireless driver

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 1/1 b43legacy: Remove unneeded variable

Fix the following coccicheck warning:

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

---
 drivers/net/wireless/broadcom/b43legacy/debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/broadcom/b43legacy/debugfs.c +3 -3
index 6b0e8d117061..55a067eaa52d 100644
@@ -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 */
#4 lore raw
Quoted 4 lines · On Wed, 2023-06-14 at 13:52 +0800, [email protected] 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.

Quoted 11 lines
---
  drivers/net/wireless/broadcom/b43legacy/debugfs.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/broadcom/b43legacy/debugfs.c +0 -0
index 6b0e8d117061..55a067eaa52d 100644

drivers/net/wireless/broadcom/b43legacy/debugfs.c static ssize_t tsf_read_file(struct b43legacy_wldev · line 78

Quoted 7 lines
drivers/net/wireless/broadcom/b43legacy/debugfs.c +1 -1
@@ -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