Commit e8eb3997 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: don't emit the CamelCase warning for PageFoo

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 10d83f07
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment