[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 1/6] xen: dt: add dt_for_each_irq_map helper

On Fri, 2015-07-03 at 16:15 +0100, Julien Grall wrote:
> >> The other caller of dt_irq_translate returns an error when ret is not 0. 
> >> I would do the same here.
> > 
> > dt_device_get_irq just returns the value of dt_irq_translate directly.
> But the caller of dt_device_get_irq is treating everything other than 0
> as an error.

> > 
> > Are you suggesting this code should treat positive results as an error
> > as well as negative ones? I don't agree, this function has the normal 0
> > on success -ve on error semantics AFAICT.
> Well, it's not documented so it can be interpreted differently.

It's not documented, but it's pretty conventional throughout most Linux

>  I
> personally interpreted as anything other than 0 is an error. This is how
> Linux behave on most of the of_* function and I think it's "safer".

...but it does look like of_* (which are dt_* in Xen) do indeed behave
that way so I shall change it.

I'm going to change the two cb invocations for consistency too.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.