From: Pawel Laszczak <pawell@cadence.com>
To: Roger Quadros <rogerq@ti.com>, "balbi@kernel.org" <balbi@kernel.org>
Cc: "peter.chen@nxp.com" <peter.chen@nxp.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rahul Kumar <kurahul@cadence.com>
Subject: RE: [PATCH 1/2] usb: cdns3: Rids of duplicate error message
Date: Thu, 8 Oct 2020 04:18:17 +0000 [thread overview]
Message-ID: <DM6PR07MB55292BB3A7BC0A46EE2F5124DD0B0@DM6PR07MB5529.namprd07.prod.outlook.com> (raw)
In-Reply-To: <94ff37e9-8a32-b61b-5ede-1b71b6a3d4ab@ti.com>
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@cadence.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
next prev parent reply other threads:[~2020-10-08 4:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 3:35 Pawel Laszczak
2020-10-07 8:11 ` Roger Quadros
2020-10-08 4:18 ` Pawel Laszczak [this message]
2020-10-08 7:28 ` Roger Quadros
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=DM6PR07MB55292BB3A7BC0A46EE2F5124DD0B0@DM6PR07MB5529.namprd07.prod.outlook.com \
--to=pawell@cadence.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kurahul@cadence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@nxp.com \
--cc=rogerq@ti.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®