checkpatch: Add missing c90 types
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | checkpatch: Add short int to c variable typesscripts/ | +1 | 0 replies | |
| 2/3 | checkpatch: Add signed generic typesscripts/ | +9 | 0 replies | |
| 3/3 | checkpatch: Add test for native c90 types in unusual orderscripts/ | +44 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Andy Whitcroft |
|---|---|
| Series | A-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] checkpatch: Add missing c90 types
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" is a found by checkpatch as a specific type, but none of the "signed int" or "int short" variants are found.
Change all the existing types to allow signed and unsigned variants. Reorder the existing types array to match longest type first.
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;").
Joe Perches (3):
checkpatch: Add short int to c variable types
checkpatch: Add signed generic types
checkpatch: Add test for native c90 types in unusual order
scripts/checkpatch.pl | 61 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 8 deletions(-)
Signature · 1 line
1.8.1.2.459.gbcd45b4.dirty