diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5219280bf7ff..b4caee6e269c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3311,7 +3311,7 @@ sub process { # known declaration macros $sline =~ /^\+\s+$declaration_macros/ || # start of struct or union or enum - $sline =~ /^\+\s+(?:union|struct|enum|typedef)\b/ || + $sline =~ /^\+\s+(?:static\s+)?(?:const\s+)?(?:union|struct|enum|typedef)\b/ || # start or end of block or continuation of declaration $sline =~ /^\+\s+(?:$|[\{\}\.\#\"\?\:\(\[])/ || # bitfield continuation