summaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorJoe Perches2013-09-11 23:24:05 +0200
committerLinus Torvalds2013-09-12 00:58:49 +0200
commit8716de383b82f16d920513138f1691e40ef5a9e3 (patch)
tree2709bb597a4d722eb1777aea752aad62c843ba04 /fs/eventpoll.c
parentcheckpatch: fix perl version 5.12 and earlier incompatibility (diff)
downloadkernel-qcow2-linux-8716de383b82f16d920513138f1691e40ef5a9e3.tar.gz
kernel-qcow2-linux-8716de383b82f16d920513138f1691e40ef5a9e3.tar.xz
kernel-qcow2-linux-8716de383b82f16d920513138f1691e40ef5a9e3.zip
checkpatch: add test for positional misuse of section specifiers like __initdata
As discussed recently on the arm [1] and lm-sensors [2] lists, it is possible to use section markers on variables in a way which gcc doesn't understand (or at least not the way the developer intended): static struct __initdata samsung_pll_clock exynos4_plls[nr_plls] = { does NOT put exynos4_plls in the .initdata section. The __initdata marker can be virtually anywhere on the line, EXCEPT right after "struct". The preferred location is before the "=" sign if there is one, or before the trailing ";" otherwise. [1] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/258149 [2] http://lists.lm-sensors.org/pipermail/lm-sensors/2013-August/039836.html So, update checkpatch to find these misuses and report an error when it's immediately after struct or union, and a warning when it's otherwise not immediately before the ; or =. A similar patch was suggested by Andi Kleen https://lkml.org/lkml/2013/8/5/648 Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Jean Delvare <khali@linux-fr.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/eventpoll.c')
0 files changed, 0 insertions, 0 deletions