Skip to content

Commit

Permalink
checkpatch: limit sN/uN matches to actual bit sizes
Browse files Browse the repository at this point in the history
Limit our type matcher to the s/u/le/be etc sizes that actually exist to
prevent miss categorising s2 as a type.  Fix up the spelling of the error
also.

Signed-off-by: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andy Whitcroft authored and torvalds committed Sep 22, 2009
1 parent ea71a0a commit fb9e909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ sub help {
}x;

our $typeTypedefs = qr{(?x:
(?:__)?(?:u|s|be|le)(?:\d|\d\d)|
(?:__)?(?:u|s|be|le)(?:8|16|32|64)|
atomic_t
)};

Expand Down Expand Up @@ -1936,7 +1936,7 @@ sub process {
# A unary '*' may be const

} elsif ($ctx =~ /.xW/) {
ERROR("Aspace prohibited after that '$op' $at\n" . $hereptr);
ERROR("space prohibited after that '$op' $at\n" . $hereptr);
}

# unary ++ and unary -- are allowed no space on one side.
Expand Down

0 comments on commit fb9e909

Please sign in to comment.