From: Greg KH <gregkh@linuxfoundation.org>
To: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Cc: jslaby@suse.com, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, huawei.libin@huawei.com
Subject: Re: [PATCH] tty: serial: 8250: remove set but unused variable
Date: Thu, 5 Dec 2019 13:22:08 +0100 [thread overview]
Message-ID: <20191205122208.GB390369@kroah.com> (raw)
In-Reply-To: <1575547903-52355-1-git-send-email-wangxiongfeng2@huawei.com>
On Thu, Dec 05, 2019 at 08:11:43PM +0800, Xiongfeng Wang wrote:
> Fix the following warning:
> drivers/tty/serial/8250/serial_cs.c: In function multi_config:
> drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable err set but not used [-Wunused-but-set-variable]
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
> ---
> drivers/tty/serial/8250/serial_cs.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c
> index c8186a0..eeda6a0 100644
> --- a/drivers/tty/serial/8250/serial_cs.c
> +++ b/drivers/tty/serial/8250/serial_cs.c
> @@ -559,16 +559,13 @@ static int multi_config(struct pcmcia_device *link)
> */
> if (info->manfid == MANFID_OXSEMI || (info->manfid == MANFID_POSSIO &&
> info->prodid == PRODID_POSSIO_GCC)) {
> - int err;
> -
> if (link->config_index == 1 ||
> link->config_index == 3) {
> - err = setup_serial(link, info, base2,
> - link->irq);
> + setup_serial(link, info, base2, link->irq);
> base2 = link->resource[0]->start;
> } else {
> - err = setup_serial(link, info, link->resource[0]->start,
> - link->irq);
> + setup_serial(link, info, link->resource[0]->start,
> + link->irq);
Again, why ignore the error value?
greg k-h
prev parent reply other threads:[~2019-12-05 12:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 12:11 Xiongfeng Wang
2019-12-05 12: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=20191205122208.GB390369@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=huawei.libin@huawei.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=wangxiongfeng2@huawei.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®