On Wed, Nov 27, 2013 at 1:36 PM, Li Guang <lig.f...@cn.fujitsu.com> wrote: > Li Guang wrote: >> >> Peter Crosthwaite wrote: >>> >>> On Tue, Nov 26, 2013 at 5:22 PM, liguang<lig.f...@cn.fujitsu.com> wrote: >>>> >>>> Signed-off-by: liguang<lig.f...@cn.fujitsu.com> >>>> --- >>>> default-configs/arm-softmmu.mak | 1 + >>>> hw/intc/Makefile.objs | 1 + >>>> hw/intc/sunxi-pic.c | 238 >>>> +++++++++++++++++++++++++++++++++++++++ >>>> include/hw/intc/sunxi-pic.h | 20 ++++
>>>> + >>>> +static void sunxi_pic_set_irq(void *opaque, int irq, int level) >>>> +{ >>>> + SunxiPICState *s = opaque; >>>> + >>>> + if (level) { >>>> + set_bit(irq, (void *)&s->irq_pending[irq/32]); >>> >>> set_bit(irq % 32, ...) >>> >> >> OK > > > No, it is wrong, > irq/32 is right. > The irq/32 is right I agree. This issue is the first arugment. Shouln't the whole thing be: set_bit(irq%32, (void *)&s->irq_pending[irq/32]); Regards, Peter