lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1884583f-5eec-7499-b987-b2e53b15b30e@huawei.com>
Date:   Thu, 20 Sep 2018 20:04:38 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     Andy Duan <fugang.duan@....com>,
        Leonard Crestez <leonard.crestez@....com>,
        "u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
        "jslaby@...e.cz" <jslaby@...e.cz>
CC:     "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "A.s. Dong" <aisheng.dong@....com>, Abel Vesa <abel.vesa@....com>,
        Anson Huang <anson.huang@....com>,
        Bough Chen <haibo.chen@....com>,
        Cosmin Samoila <cosmin.samoila@....com>,
        Daniel Baluta <daniel.baluta@....com>, Han Xu <han.xu@....com>,
        Jacky Bai <ping.bai@....com>, Jun Li <jun.li@....com>,
        "Leo Zhang" <leo.zhang@....com>, Peng Fan <peng.fan@....com>,
        Peter Chen <peter.chen@....com>,
        Ranjani Vaidyanathan <ranjani.vaidyanathan@....com>,
        Robert Chiras <robert.chiras@....com>,
        Robin Gong <yibin.gong@....com>,
        Shenwei Wang <shenwei.wang@....com>,
        Viorel Suman <viorel.suman@....com>,
        Zening Wang <zening.wang@....com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH -next] serial: imx: remove set but not used variable
 'rtsirq'

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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ