Thread (34 messages) 34 messages, 6 authors, 2013-09-26

Re: [PATCH 2/9] irqdomain: Introduce __irq_create_mapping()

From: Linus Walleij <hidden>
Date: 2013-09-24 12:20:47
Also in: linux-gpio, linux-i2c, linux-tegra, lkml

On Mon, Sep 23, 2013 at 10:29 PM, Thierry Reding
[off-list ref] wrote:
On Mon, Sep 23, 2013 at 09:14:30PM +0200, Linus Walleij wrote:
quoted
I think it is better to first go over the call sites and make them
all handle negative return numbers rather than pushing the
obscure __interface.
(...)
Well, the problem is that the current patch changes the signature of the
function as well, therefore the call sites will have to be updated all
at once in a single patch to avoid build breakage.
Hm yeah OK I see the problem, but can we atleast avoid the
__thing? Like calling the new function irq_create_mapping_strict()
or whatever.
Another alternative could be to change the signature in a way that does
not break compatibility. For instance I think it could work out if we
change this function to return int instead of unsigned int but keep the
same semantics to begin with (return 0 on failure). Then update all call
sites to handle potential negative errors and after that return negative
error codes.
Hm that sounds like an attractive solution to me actually.
That still wouldn't catch any callers introduced between
the patch creation and application.
Such things happen all the time, just have to be attentive in
what goes into linux-next...

Another minor thing:

+static int __irq_create_mapping(struct irq_domain *domain,
+                               irq_hw_number_t hwirq, unsigned int *virqp)

Unless you can make a very good case for why there should
be a "v" in the beginning of virqp, then remove it and call it
"irqp" simply.

All Linux IRQs are virtual and we're already clearly separating
out those that are not by calling them "hwirq".

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help