From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip: Add support for ARMv7-M's NVIC
Date: Tue, 12 Mar 2013 20:27:02 +0100 [thread overview]
Message-ID: <20130312192702.GQ15375@pengutronix.de> (raw)
In-Reply-To: <20130312160101.GW4977@n2100.arm.linux.org.uk>
On Tue, Mar 12, 2013 at 04:01:01PM +0000, Russell King - ARM Linux wrote:
> On Tue, Mar 12, 2013 at 04:54:33PM +0100, Uwe Kleine-K?nig wrote:
> > +#include <asm/irq.h>
> > +#include <asm/io.h>
>
> linux/io.h
>
> > + unsigned int irqs, i, irq_base;
> > +
> > + irq_base = irq_alloc_descs(-1, 16, irqs - 16, numa_node_id());
> > + if (IS_ERR_VALUE(irq_base)) {
>
> Erm... irq_alloc_descs() returns a negative number on error.
>
> if ((int)irq_base < 0)
>
> or make irq_base an int, and use:
>
> if (irq_base < 0)
Just for me: So the check using IS_ERR_VALUE is as wrong as the other
occurences in arch/arm that you just kicked out or is it just ugly?
I thought about it and went the "make irq_base int" route (and even
fixed the asm includes) even before I sent my patch. Just failed to pass
the right hash to format-patch after rebasing :-|
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2013-03-12 19:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 15:54 [PATCH] irqchip: Add support for ARMv7-M's NVIC Uwe Kleine-König
2013-03-12 16:01 ` Russell King - ARM Linux
2013-03-12 19:27 ` Uwe Kleine-König [this message]
2013-03-12 20:13 ` Russell King - ARM Linux
2013-03-12 19:57 ` Thomas Gleixner
2013-03-12 20:47 ` Uwe Kleine-König
2013-03-12 21:40 ` Thomas Gleixner
2013-03-18 13:20 ` [PATCH v2] " Uwe Kleine-König
2013-03-28 13:28 ` Uwe Kleine-König
2013-03-28 22:32 ` Arnd Bergmann
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=20130312192702.GQ15375@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).