diff options
author | Joe Perches <joe@perches.com> | 2014-08-06 16:11:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-06 18:01:29 -0700 |
commit | 1813087dbc54ff1485bcc84b66d34052eaf23387 (patch) | |
tree | c4b5bbcbe464f3ecb894767f8c96f5fdac9f0d71 /scripts/coccinelle/api/ptr_ret.cocci | |
parent | 0c773d9d66684aefd919c4b4550fe16003c54c0e (diff) |
checkpatch: add test for native c90 types in unusual order
c90 section "6.7.2 Type Specifiers" says:
"type specifiers may occur in any order"
That means that:
short int is the same as int short
unsigned short int is the same as int unsigned short
etc...
checkpatch currently parses only a subset of these allowed types.
For instance: "unsigned short" and "signed short" are found by
checkpatch as a specific type, but none of the or "int short" or "int
signed short" variants are found.
Add another table for the "kernel style misordered" variants.
Add this misordered table to the findable types.
Warn when the misordered style is used.
This improves the "Missing a blank line after declarations" test as it
depends on the correct parsing of the $Declare variable which looks for
"$Type $Ident;" (ie: declarations like "int foo;").
Signed-off-by: Joe Perches <joe@perches.com>
Acked-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/coccinelle/api/ptr_ret.cocci')
0 files changed, 0 insertions, 0 deletions