From: Leonard Crestez <leonard.crestez@nxp.com>
To: "yuehaibing@huawei.com" <yuehaibing@huawei.com>,
"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
"jslaby@suse.cz" <jslaby@suse.cz>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
Andy Duan <fugang.duan@nxp.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] serial: imx: remove set but not used variable 'rtsirq'
Date: Thu, 20 Sep 2018 08:50:44 +0000 [thread overview]
Message-ID: <96170d620618804d49ad19323d3cdee853070c72.camel@nxp.com> (raw)
In-Reply-To: <3b23675a-f537-868f-2432-b7f8a0c8c466@suse.cz>
On Thu, 2018-09-20 at 08:45 +0200, Jiri Slaby wrote:
> On 09/20/2018, 03:58 AM, YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> >
> > drivers/tty/serial/imx.c: In function 'imx_uart_probe':
> > drivers/tty/serial/imx.c:2198:20: warning:
> > variable 'rtsirq' set but not used [-Wunused-but-set-variable]
> >
> > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> > @@ -2220,7 +2220,6 @@ static int imx_uart_probe(struct platform_device *pdev)
> >
> > rxirq = platform_get_irq(pdev, 0);
> > txirq = platform_get_irq(pdev, 1);
> > - rtsirq = platform_get_irq(pdev, 2);
>
> I am not sure this is correct. platform_get_irq has side effects (like
> enabling the IRQ). Are you sure this won't change the behaviour (this is
> question mostly to IMX fellows)?
As far as I can tell there was a request_irq call for rtsirq which was
removed by mistake in commit afe9cbb1a6ad ("serial: imx: drop support
for IRDA"):
- /* do not use RTS IRQ on IrDA */
- if (!USE_IRDA(sport)) {
- ret = devm_request_irq(&pdev->dev, rtsirq,
- imx_rtsint, 0,
- dev_name(&pdev->dev), sport);
- if (ret)
- return ret;
- }
This should have just removed the IRDA check and request rtsirq
unconditionally. Nobody noticed this by testing RTS on imx1, this is an
old chip and later variants have a single combined irq.
The correct fix for the warning would be to restore that request_irq.
--
Regards,
Leonard
next prev parent reply other threads:[~2018-09-20 8:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 1:58 YueHaibing
2018-09-20 7:19 ` Uwe Kleine-König
2018-09-20 12:11 ` [PATCH] serial: imx: restore handshaking irq for imx1 Uwe Kleine-König
2018-09-20 12:17 ` Leonard Crestez
2018-09-21 1:18 ` Andy Duan
[not found] ` <3b23675a-f537-868f-2432-b7f8a0c8c466@suse.cz>
2018-09-20 8:50 ` Leonard Crestez [this message]
2018-09-20 9:41 ` [PATCH -next] serial: imx: remove set but not used variable 'rtsirq' Andy Duan
2018-09-20 12:04 ` YueHaibing
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=96170d620618804d49ad19323d3cdee853070c72.camel@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=fugang.duan@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yuehaibing@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®