aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-09-21 20:04:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:48 -0400
commitfb9e9096ba94385b738a8ad6c5864b5778285957 (patch)
treeb066899e4c5a4ca033babb068acdc7d0132186c5 /scripts/checkpatch.pl
parentea71a0a019f913bdf506103bd90140d93a2b83f0 (diff)
checkpatch: limit sN/uN matches to actual bit sizes
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 <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 57df90699219..7fee82384ed4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -182,7 +182,7 @@ our $UTF8 = qr {
182}x; 182}x;
183 183
184our $typeTypedefs = qr{(?x: 184our $typeTypedefs = qr{(?x:
185 (?:__)?(?:u|s|be|le)(?:\d|\d\d)| 185 (?:__)?(?:u|s|be|le)(?:8|16|32|64)|
186 atomic_t 186 atomic_t
187)}; 187)};
188 188
@@ -1936,7 +1936,7 @@ sub process {
1936 # A unary '*' may be const 1936 # A unary '*' may be const
1937 1937
1938 } elsif ($ctx =~ /.xW/) { 1938 } elsif ($ctx =~ /.xW/) {
1939 ERROR("Aspace prohibited after that '$op' $at\n" . $hereptr); 1939 ERROR("space prohibited after that '$op' $at\n" . $hereptr);
1940 } 1940 }
1941 1941
1942 # unary ++ and unary -- are allowed no space on one side. 1942 # unary ++ and unary -- are allowed no space on one side.