The patch titled Subject: checkpatch: improve test for no space after cast has been added to the -mm tree. Its filename is checkpatch-improve-test-for-no-space-after-cast.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-improve-test-for-no-space-after-cast.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-improve-test-for-no-space-after-cast.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/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Joe Perches <joe@xxxxxxxxxxx> Subject: checkpatch: improve test for no space after cast sizeof(foo) is not a cast, allow a space after it. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Tested-by: Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN scripts/checkpatch.pl~checkpatch-improve-test-for-no-space-after-cast scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-improve-test-for-no-space-after-cast +++ a/scripts/checkpatch.pl @@ -2515,7 +2515,8 @@ sub process { } } - if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|{)/) { + if ($line =~ /^\+.*(\w+\s*)?\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|[,;\({\[\<\>])/ && + (!defined($1) || $1 !~ /sizeof\s*/)) { if (CHK("SPACING", "No space is necessary after a cast\n" . $herecurr) && $fix) { _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are origin.patch mm-utilc-add-kstrimdup.patch checkpatch-add-an-error-test-for-no-space-before-comma.patch checkpatch-add-error-on-use-of-attributeweak-or-__weak-declarations.patch checkpatch-improve-test-for-no-space-after-cast.patch fs-affs-amigaffsc-use-va_format-instead-of-buffer-vnsprintf.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html