lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bb17265969d1850462bd1d89df71d43f6d40967b.camel@sipsolutions.net>
Date:   Wed, 14 Jun 2023 09:33:46 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     wuyonggang001@...suo.com, Larry.Finger@...inger.net,
        kvalo@...nel.org
Cc:     linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] b43legacy: Remove unneeded variable

On Wed, 2023-06-14 at 13:52 +0800, wuyonggang001@...suo.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@...suo.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ