diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6b21188d2cf7..17e1d94fa1fa 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1324,7 +1324,7 @@ sub process { possible($type, "A:" . $s); # definitions in global scope can only start with types - } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b/s) { + } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b\s*(?!:)/s) { possible($1, "B:" . $s); }