From: Andreas Larsson <andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
To: Nikita Yushchenko
<nyushchenko-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Benjamin Herrenschmidt
<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lugovskoy-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org
Subject: Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate
Date: Mon, 16 Jun 2014 11:54:05 +0200 [thread overview]
Message-ID: <539EBEBD.6080903@gaisler.com> (raw)
In-Reply-To: <539EBC8E.6060602-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org>
On 2014-06-16 11:44, Nikita Yushchenko wrote:
>>> diff --git a/drivers/usb/host/ehci-grlib.c
>>> b/drivers/usb/host/ehci-grlib.c
>>> index 495b6fb..666c03e 100644
>>> --- a/drivers/usb/host/ehci-grlib.c
>>> +++ b/drivers/usb/host/ehci-grlib.c
>>> @@ -111,11 +111,11 @@ static int ehci_hcd_grlib_probe(struct
>>> platform_device *op)
>>> hcd->rsrc_start = res.start;
>>> hcd->rsrc_len = resource_size(&res);
>>>
>>> - irq = irq_of_parse_and_map(dn, 0);
>>> - if (irq == NO_IRQ) {
>>> - dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
>>> + irq = devm_irq_of_parse_and_map(&op->dev, dn, 0);
>>> + if (irq <= 0) {
>>> + dev_err(&op->dev, "%s: devm_irq_of_parse_and_map failed\n",
>>> __FILE__);
>>> - rv = -EBUSY;
>>> + rv = irq ? irq : -EINVAL;
>>
>> Here and in more places below you change the return value from -EBUSY to
>> -EINVAL when irq == 0. These changes and the reason for them is not
>> something that is commented upon in the commit message. Maybe these
>> changes were not intended or should be in a separate patch?
>
> Although errno codes are quite unspecific, I can't think a valid reason
> to return -EBUSY on [devm_]irq_of_parse_and_map() failure. It could be
> -EINVAL or -ENODEV, but not -EBUSY ...
>
> Since changing line that sets error code anyway, I decided to change
> -EBUST to -ENODEV.
>
> But I agree that this is not the topic of the patch.
>
> IS it better to remove this change from changeset alltogether, or to
> mention it in commit's log message?
Given that there are a lot of -EBUSY being returned in drivers/usb/host
- not just in these error cases, maybe it is better to not touch this in
this patch set.
Best regards,
Andreas Larsson
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-06-16 9:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 11:13 [PATCH 00/21] add and use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 01/21] irq: add devres version of OF IRQ mapping routines nyushchenko
[not found] ` <1401880402-30091-2-git-send-email-nyushchenko-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org>
2014-06-04 13:39 ` Thomas Gleixner
2014-06-04 11:13 ` [PATCH 02/21] ata: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 03/21] exynos5440-cpufreq: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 04/21] omap-sham: " nyushchenko
2014-06-04 11:13 ` [PATCH 05/21] dma: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 06/21] mpc85xx_edac: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 07/21] gpio: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 08/21] i2c: " nyushchenko
2014-06-04 11:13 ` [PATCH 09/21] apbps2: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 10/21] media: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 12/21] mpc5121_nfc: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 13/21] net/can: use devm_irq_of_parse_and_map() where appropriate nyushchenko
[not found] ` <1401880402-30091-1-git-send-email-nyushchenko-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org>
2014-06-04 11:13 ` [PATCH 11/21] mfd: " nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-17 15:12 ` Lee Jones
2014-06-17 15:36 ` Nikita Yushchenko
2014-06-18 8:48 ` Lee Jones
2014-06-18 11:31 ` Nikita Yushchenko
2014-06-18 12:20 ` Lee Jones
2014-06-04 11:13 ` [PATCH 14/21] net/ethernet: " nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-04 11:13 ` [PATCH 15/21] pinctrl: " nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-04 11:13 ` [PATCH 20/21] usb: " nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
[not found] ` <1401880402-30091-21-git-send-email-nyushchenko-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org>
2014-06-16 9:35 ` Andreas Larsson
[not found] ` <539EBA6F.7060008-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2014-06-16 9:44 ` Nikita Yushchenko
[not found] ` <539EBC8E.6060602-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org>
2014-06-16 9:54 ` Andreas Larsson [this message]
2014-06-04 11:13 ` [PATCH 16/21] bq24190_charger: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 17/21] rtc-mpc5121: " nyushchenko
2014-06-04 11:13 ` [PATCH 18/21] spi: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 19/21] exynos_tmu: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 21/21] at91sam9_wdt: " nyushchenko
2014-06-12 10:03 ` [PATCH 00/21] add and " Andreas Larsson
[not found] ` <5399AE1B.1080301@gaisler.com>
2014-06-12 19:02 ` Nikita Yushchenko
2014-06-16 8:23 ` Andreas Larsson
[not found] ` <539EA986.1090501-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2014-06-16 8:36 ` Nikita Yushchenko
2014-06-16 9:29 ` Andreas Larsson
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=539EBEBD.6080903@gaisler.com \
--to=andreas-fkztooa/julbdgjk7y7tuq@public.gmane.org \
--cc=benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lugovskoy-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org \
--cc=nyushchenko-jFhMxQ4mL6a2X5qOxWx28w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
/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).