diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2016-01-20 23:59:21 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-21 02:09:18 +0100 |
commit | 6b10df4257367dd0ead49f88df473972c00a8b5c (patch) | |
tree | 52c2355b8c41dada900dd6ad2ea0b4d529c3dc03 /scripts/gdb | |
parent | checkpatch: improve macros with flow control test (diff) | |
download | linux-6b10df4257367dd0ead49f88df473972c00a8b5c.tar.xz linux-6b10df4257367dd0ead49f88df473972c00a8b5c.zip |
checkpatch: fix a number of COMPLEX_MACRO false positives
A simple search over the kernel souce displays a number of correctly
defined multiline macro, which generally are used as an array element
initializer:
% find ../linux -type f | xargs grep -B1 -H '^[:space]*\[.*\\$'
However checkpatch.pl unexpectedly complains about all these macro
definitions:
% ./scripts/checkpatch.pl --types COMPLEX_MACRO -f include/linux/perf/arm_pmu.h
ERROR: Macros with complex values should be enclosed in parentheses
+#define PERF_MAP_ALL_UNSUPPORTED \
+ [0 ... PERF_COUNT_HW_MAX - 1] = HW_OP_UNSUPPORTED
The change intends to fix this type of false positives by flattening
only array members and skipping array element designators.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Joe Perches <joe@perches.com>
Cc: 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/gdb')
0 files changed, 0 insertions, 0 deletions