On 2018/9/20 17:41, Andy Duan wrote: > From: Leonard Crestez Sent: 2018年9月20日 16:51 >> 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 > > Yes, your explain is very correct! Thanks for your comment. > We should restore rtsirq request that for i.MX1. Ok, I will post a new fix patch as Leonard and suggested. > > Regards, > Andy Duan >