From: Greg KH <gregkh@linuxfoundation.org>
To: Zhu Jun <zhujun2@cmss.chinamobile.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/applicom:Remove redundant ret variable in ac_read function
Date: Tue, 8 Oct 2024 10:22:14 +0200 [thread overview]
Message-ID: <2024100803-reshoot-reburial-a9eb@gregkh> (raw)
In-Reply-To: <20241008074818.13335-1-zhujun2@cmss.chinamobile.com>
On Tue, Oct 08, 2024 at 12:48:18AM -0700, Zhu Jun wrote:
> Removed the unused variable 'ret' from the ac_read function
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
> drivers/char/applicom.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
> index ea25caf35346..ba512d8dffba 100644
> --- a/drivers/char/applicom.c
> +++ b/drivers/char/applicom.c
> @@ -536,7 +536,6 @@ static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_
> unsigned long flags;
> unsigned int i;
> unsigned char tmp;
> - int ret = 0;
> DECLARE_WAITQUEUE(wait, current);
> #ifdef DEBUG
> int loopcount=0;
> @@ -567,7 +566,7 @@ static ssize_t ac_read (struct file *filp, char __user *buf, size_t count, loff_
>
> /* Got a packet for us */
> memset(&st_loc, 0, sizeof(st_loc));
> - ret = do_ac_read(i, buf, &st_loc, &mailbox);
> + do_ac_read(i, buf, &st_loc, &mailbox);
Why not check that this worked properly instead? Can you test this
change? Why make this change if you can not?
thanks,
greg k-h
prev parent reply other threads:[~2024-10-08 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 7:48 Zhu Jun
2024-10-08 8:22 ` Greg KH [this message]
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=2024100803-reshoot-reburial-a9eb@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=zhujun2@cmss.chinamobile.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
all inboxes | Powered by JetHome®