> But I find the source code formatting occasionally questionable
> according to the Linux coding style.
elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch
../janitor/use_array_size_for_kmemdup2.cocci task_test6.c
…
@@ -1,6 +1,6 @@
void* my_task(void)
{
void* copy;
-copy = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
+copy = kmemdup(ohs,array_size( sizeof(*ohs), oh_cnt), GFP_KERNEL);
return copy;
}
How would you like to clarify pretty-printing concerns?
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci