From: thierry.reding@avionic-design•de (Thierry Reding)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] irqdomain: Initialize number of IRQs for simple domains
Date: Sat, 7 Jan 2012 12:40:16 +0100 [thread overview]
Message-ID: <20120107114016.GA3655@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <20120106213422.GF7457@ponder.secretlab.ca>
* Grant Likely wrote:
> No. ERR_PTR is a horrible pattern because you cannot tell by looking
> at a prototype that returns a pointer whether or not the correct
> failure test is "if (!ptr)" or "if (IS_ERR(ptr))". Unless it is
> absolutely critical for an error code to be returned (which isn't the
> case here) I will not accept new code that uses ERR_PTR().
>
> In this case, if irq_domain_add_simple() fails, then something is very
> wrong. I'd much rather the routine complain loudly regardless of the
> error condition.
Okay, I'll keep the WARN_ON(1) and simply return NULL.
> Actually, looking again at irq_domain_generate_simple() it should
> probably succeed even if it cannot find a matching node since an
> irq_domain does more than just device tree translation. Although,
> irq_domain_generate_simple() is a stop-gap solution that will
> eventually be removed.
So I'll just handle errors in irq_domain_generate_simple() the same way as in
irq_domain_add_simple() and will return NULL if no matching node is found.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120107/7b937ced/attachment.sig>
next prev parent reply other threads:[~2012-01-07 11:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 14:28 [PATCH] irqdomain: Initialize number of IRQs for simple domains Thierry Reding
2012-01-06 14:36 ` Nicolas Ferre
2012-01-06 15:04 ` Grant Likely
2012-01-06 16:20 ` Thierry Reding
2012-01-06 21:34 ` Grant Likely
2012-01-07 11:40 ` Thierry Reding [this message]
2012-01-06 16:07 ` David Brown
2012-01-06 16:12 ` Thierry Reding
2012-01-06 16:26 ` Rob Herring
2012-01-06 18:52 ` David Brown
2012-01-06 16:58 ` Cousson, Benoit
2012-01-09 9:03 ` Thierry Reding
2012-01-07 5:58 ` Shawn Guo
2012-01-07 11:47 ` Thierry Reding
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=20120107114016.GA3655@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding@avionic-design$(echo .)de \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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