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

From: SF Markus Elfring
Date: Sat Aug 27 2016 - 02:27:38 EST


>> - 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