On 09/12/2011 06:07 AM, Avi Kivity wrote:
> +static void malta_isa_irq_handler(void *opaque, int n, int level)
> +{
> +    MaltaISAState *s = opaque;
> +
> +    if (s->i8259) {
> +        qemu_set_irq(s->i8259[n], level);
> +    }
> +}

Is there any point in the IF?  I realize that there's an ordering
problem that requires the use of the memory indirection in order
to be able to provide *some* opaque value at the proper time, but
AFAICT the ->i8259 value will *always* be non-null at the point
this function is called.  Am I wrong here?

Otherwise the approach looks correct.


r~

Reply via email to