Re: IA64-IRQ: Use kmalloc_array() in sn_irq_lh_init()

SF Markus Elfring
2016-08-27T06:27:33Z

>> - sn_irq_lh[i] = kmalloc(sizeof(struct list_head), GFP_KERNEL);
>> + sn_irq_lh[i] = kmalloc(*sn_irq_lh[i], GFP_KERNEL);
>
> Did a sizeof get lost here?

Unfortunately, yes.

It is strange that I overlooked such a hiccup yesterday.

Should I start to automate the source code transformation which I imagined here
better with further scripts for the semantic patch language?

Regards,
Markus