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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Oct 2020 04:18:17 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Roger Quadros <rogerq@...com>,
        "balbi@...nel.org" <balbi@...nel.org>
CC:     "peter.chen@....com" <peter.chen@....com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Rahul Kumar <kurahul@...ence.com>
Subject: RE: [PATCH 1/2] usb: cdns3: Rids of duplicate error message

Hi Roger,

>
>On 07/10/2020 06:35, Pawel Laszczak wrote:
>> On failure, the platform_get_irq_byname prints an error message
>> so, patch removes error message related to this function from
>> core.c file.
>>
>> A change was suggested during reviewing CDNSP driver by Chunfeng Yun.
>>
>> Signed-off-by: Pawel Laszczak <pawell@...ence.com>
>> ---
>>   drivers/usb/cdns3/core.c | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
>> index a0f73d4711ae..4fd3c742d9d5 100644
>> --- a/drivers/usb/cdns3/core.c
>> +++ b/drivers/usb/cdns3/core.c
>> @@ -469,9 +469,6 @@ static int cdns3_probe(struct platform_device *pdev)
>>   	if (cdns->dev_irq == -EPROBE_DEFER)
>
>if (cdns->dev_irq < 0 && cdns->dev_irq == -EPROBE_DEFER)

It's the same - cdns->dev_irq == -EPROBE_DEFER < 0 


>>   		return cdns->dev_irq;
>>
>> -	if (cdns->dev_irq < 0)
>> -		dev_err(dev, "couldn't get peripheral irq\n");
>> -
>>   	regs = devm_platform_ioremap_resource_byname(pdev, "dev");
>>   	if (IS_ERR(regs))
>>   		return PTR_ERR(regs);
>> @@ -481,10 +478,8 @@ static int cdns3_probe(struct platform_device *pdev)
>>   	if (cdns->otg_irq == -EPROBE_DEFER)
>
>if (cdns->otg_irq < 0 && cdns->otg_irq == -EPROBE_DEFER)

It should be:
if (cdns->dev_irq < 0 || cdns->dev_irq == -EPROBE_DEFER)
or event
if (cdns->dev_irq < 0)

Am I right ?

>
>>   		return cdns->otg_irq;
>>
>> -	if (cdns->otg_irq < 0) {
>> -		dev_err(dev, "couldn't get otg irq\n");
>> +	if (cdns->otg_irq < 0)
>
>you can then get rid of this if {}.
>
>>   		return cdns->otg_irq;
>> -	}
>>
>>   	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "otg");
>>   	if (!res) {
>>

Cheers,
Pawell

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ