Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: wuyonggang001@208suo.com, Larry.Finger@lwfinger.net, kvalo@kernel.org
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] b43legacy: Remove unneeded variable
Date: Wed, 14 Jun 2023 09:33:46 +0200	[thread overview]
Message-ID: <bb17265969d1850462bd1d89df71d43f6d40967b.camel@sipsolutions.net> (raw)
In-Reply-To: <5e1b466986b2371f71f99d7123f1de6d@208suo.com>

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

  reply	other threads:[~2023-06-14  7:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230612044742.58785-1-zhanglibing@cdjrlc.com>
     [not found] ` <2caa7e16691b9cecab28aec323785a35@208suo.com>
     [not found]   ` <e598894f5a32c00ff905b010bd8e286f@208suo.com>
2023-06-14  5:52     ` [PATCH] b43legacy: Remove unneeded variable wuyonggang001
2023-06-14  7:33       ` Johannes Berg [this message]
     [not found] <20230614075250.29097-1-zhanglibing@cdjrlc.com>
2023-06-14  7:55 ` wuyonggang001
2023-06-14  8:02   ` Johannes Berg
2023-06-14  8:16     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb17265969d1850462bd1d89df71d43f6d40967b.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wuyonggang001@208suo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox