checkpatch: don't emit the CamelCase warning for PageFoo
authorJoe Perches <joe@perches.com>
Fri, 22 Feb 2013 00:44:17 +0000 (16:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 01:22:26 +0000 (17:22 -0800)
I'm getting a ton of these:

  WARNING: Avoid CamelCase: <PageTransHuge>
  #140: FILE: mm/migrate.c:1576:
  +       if (PageTransHuge(page) && page_count(page) != 3) {

So exclude anything which starts with "Page".

Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 3dcfbc9c6db46159293147977c2dbb69a1f885f4..2c50eb4c4e6654f741a9e8cce82e0d3530ab19ac 100755 (executable)
@@ -2930,6 +2930,7 @@ sub process {
                        my $var = $1;
                        if ($var !~ /$Constant/ &&
                            $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
+                           $var !~ /^Page[A-Z]/ &&
                            !defined $camelcase{$var}) {
                                $camelcase{$var} = 1;
                                WARN("CAMELCASE",