The patch titled Subject: checkpatch: improve ALLOC_ARRAY_ARGS test has been added to the -mm tree. Its filename is checkpatch-improve-alloc_array_args-test.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/checkpatch-improve-alloc_array_args-test.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-improve-alloc_array_args-test.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Subject: checkpatch: improve ALLOC_ARRAY_ARGS test The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested Add the corresponding check. Link: https://lkml.kernel.org/r/205fc4847972fb6779abcc8818f39c14d1b45af1.1618595794.git.christophe.jaillet@xxxxxxxxxx Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Acked-by: Joe Perches <joe@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/checkpatch.pl~checkpatch-improve-alloc_array_args-test +++ a/scripts/checkpatch.pl @@ -6911,7 +6911,7 @@ sub process { } # check for alloc argument mismatch - if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) { + if ($line =~ /\b((?:devm_)?(?:kcalloc|kmalloc_array))\s*\(\s*sizeof\b/) { WARN("ALLOC_ARRAY_ARGS", "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr); } _ Patches currently in -mm which might be from christophe.jaillet@xxxxxxxxxx are checkpatch-improve-alloc_array_args-test.patch