mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-arm-kernel@lists.infradead.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mxser: remove redundant assignment to hwid
Date: Thu, 4 Aug 2022 07:43:08 +0200	[thread overview]
Message-ID: <83c91a99-7fb8-321a-5d52-8f0b4a7cf1cb@kernel.org> (raw)
In-Reply-To: <20220730130925.150018-1-colin.i.king@gmail.com>

On 30. 07. 22, 15:09, Colin Ian King wrote:
> The variable hwid is assigned a value but it is never read. The
> assignment is redundant and can be removed.
> 
> Cleans up clang scan build warning:
> drivers/tty/mxser.c:401:7: warning: Although the value stored to 'hwid'
> is used in the enclosing expression, the value is never actually read
> from 'hwid' [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Acked-by: Jiri Slaby <jirislaby@kernel.org>

> ---
>   drivers/tty/mxser.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
> index 70b982b2c6b2..600c71e5eebc 100644
> --- a/drivers/tty/mxser.c
> +++ b/drivers/tty/mxser.c
> @@ -398,7 +398,7 @@ static enum mxser_must_hwid mxser_must_get_hwid(unsigned long io)
>   	oldmcr = inb(io + UART_MCR);
>   	outb(0, io + UART_MCR);
>   	mxser_set_must_xon1_value(io, 0x11);
> -	if ((hwid = inb(io + UART_MCR)) != 0) {
> +	if (inb(io + UART_MCR) != 0) {

Yes, hwid is read later, this was a dummy assignment.

>   		outb(oldmcr, io + UART_MCR);
>   		return MOXA_OTHER_UART;
>   	}

thanks,
-- 
js
suse labs

      reply	other threads:[~2022-08-04  5:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 13:09 Colin Ian King
2022-08-04  5:43 ` Jiri Slaby [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=83c91a99-7fb8-321a-5d52-8f0b4a7cf1cb@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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®