checkpatch: add short int to c variable types
authorJoe Perches <[email protected]>
Wed, 6 Aug 2014 23:11:18 +0000 (16:11 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Aug 2014 01:01:29 +0000 (18:01 -0700)
short int is one of the 6.7.2 c90 types.
Find it appropriately.

This fixes a defect in checkpatch where it suggests that a line break
after declaration is required using an input like:

int foo;
short int bar;

Without this change, it warns on the short int line.

Signed-off-by: Joe Perches <[email protected]>
Reported-by: Hartley Sweeten <[email protected]>
Acked-by: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl

index dc72a9b3172daf54ca1fac44e014b64f6a290b03..c647caab913cde8f4153e0f9f177ebbdddb8e1e5 100755 (executable)
@@ -356,6 +356,7 @@ our $signature_tags = qr{(?xi:
 our @typeList = (
        qr{void},
        qr{(?:unsigned\s+)?char},
+       qr{(?:unsigned\s+)?short\s+int},
        qr{(?:unsigned\s+)?short},
        qr{(?:unsigned\s+)?int},
        qr{(?:unsigned\s+)?long},