From: Peter Chen <peter.chen@nxp.com>
To: Pawel Laszczak <pawell@cadence.com>,
"balbi@kernel.org" <balbi@kernel.org>
Cc: "rogerq@ti.com" <rogerq@ti.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>,
"kurahul@cadence.com" <kurahul@cadence.com>
Subject: RE: [PATCH v3] usb: cdns3: Rids of duplicate error message
Date: Tue, 13 Oct 2020 07:53:49 +0000 [thread overview]
Message-ID: <AM8PR04MB7300072DF781A5FD6FAA51DD8B040@AM8PR04MB7300.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20201013040005.25706-1-pawell@cadence.com>
> On failure, the platform_get_irq_byname prints an error message so, patch
typo, "message, so patch..." Otherwise:
Acked-by: Peter Chen <peter.chen@nxp.com>
Peter
> 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>
> ---
> Changelog:
> v3
> - changed error condition checking for dev_irq.
> v2
> - simplified code as sugested by Roger Quadros.
>
> drivers/usb/cdns3/core.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index
> a0f73d4711ae..f2dedce3a40e 100644
> --- a/drivers/usb/cdns3/core.c
> +++ b/drivers/usb/cdns3/core.c
> @@ -466,11 +466,8 @@ static int cdns3_probe(struct platform_device *pdev)
> cdns->xhci_res[1] = *res;
>
> cdns->dev_irq = platform_get_irq_byname(pdev, "peripheral");
> - if (cdns->dev_irq == -EPROBE_DEFER)
> - return cdns->dev_irq;
> -
> if (cdns->dev_irq < 0)
> - dev_err(dev, "couldn't get peripheral irq\n");
> + return cdns->dev_irq;
>
> regs = devm_platform_ioremap_resource_byname(pdev, "dev");
> if (IS_ERR(regs))
> @@ -478,14 +475,9 @@ static int cdns3_probe(struct platform_device *pdev)
> cdns->dev_regs = regs;
>
> cdns->otg_irq = platform_get_irq_byname(pdev, "otg");
> - if (cdns->otg_irq == -EPROBE_DEFER)
> + if (cdns->otg_irq < 0)
> return cdns->otg_irq;
>
> - if (cdns->otg_irq < 0) {
> - dev_err(dev, "couldn't get otg irq\n");
> - return cdns->otg_irq;
> - }
> -
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "otg");
> if (!res) {
> dev_err(dev, "couldn't get otg resource\n");
> --
> 2.17.1
prev parent reply other threads:[~2020-10-13 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 4:00 [PATCH v3] usb: cdns3: Rids of duplicate error message Pawel Laszczak
2020-10-13 7:53 ` Peter Chen [this message]
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=AM8PR04MB7300072DF781A5FD6FAA51DD8B040@AM8PR04MB7300.eurprd04.prod.outlook.com \
--to=peter.chen@nxp.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=pawell@cadence.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;
as well as URLs for NNTP newsgroup(s).