devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@au1.ibm.com>
To: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>,
	devicetree@vger.kernel.org
Cc: linux-pci@vger.kernel.org, robh+dt@kernel.org,
	linuxppc-dev@lists.ozlabs.org, frowand.list@gmail.com
Subject: Re: [PATCH] of/irq: improve error message on irq discovery process failure
Date: Fri, 11 Nov 2016 08:28:32 +1100	[thread overview]
Message-ID: <1478813312.2592.0.camel@au1.ibm.com> (raw)
In-Reply-To: <1478700308-25481-1-git-send-email-gpiccoli@linux.vnet.ibm.com>

On Wed, 2016-11-09 at 12:05 -0200, Guilherme G. Piccoli wrote:
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index 393fea8..1ad6882 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -275,7 +275,10 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
>         of_node_put(ipar);
>         of_node_put(newpar);
>  
> -       return -EINVAL;
> +       /* Positive non-zero return means no Level-triggered Interrupts
> +        * capability was found.
> +        */
> +       return ENOENT;
>  }
>  EXPORT_SYMBOL_GPL(of_irq_parse_raw);

I'm not fan. I'd rather it's -ENOENT and the callers can check for that
specific code rather than playing with the sign.

Cheers,
Ben.

      parent reply	other threads:[~2016-11-10 21:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 14:05 [PATCH] of/irq: improve error message on irq discovery process failure Guilherme G. Piccoli
2016-11-09 18:05 ` Rob Herring
     [not found]   ` <CAL_JsqL13-e5RGfafsLfP7EoJWTkAsuRG4mAF-t52GoDXeQS-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-09 19:05     ` Guilherme G. Piccoli
     [not found] ` <1478700308-25481-1-git-send-email-gpiccoli-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-11-09 19:04   ` Mark Rutland
2016-11-10 21:30     ` Benjamin Herrenschmidt
2016-11-11 16:32       ` Mark Rutland
2016-11-11 19:12         ` Benjamin Herrenschmidt
     [not found]           ` <1478891547.2592.13.camel-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org>
2016-11-11 22:27             ` Guilherme G. Piccoli
2016-11-10 21:28 ` Benjamin Herrenschmidt [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=1478813312.2592.0.camel@au1.ibm.com \
    --to=benh@au1.ibm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=robh+dt@kernel.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).