original_kernel/scripts
Joe Perches 8716de383b 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>
2013-09-11 15:58:49 -07:00
..
basic
coccinelle Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2013-09-07 19:47:35 -07:00
dtc
genksyms
kconfig kconfig: do not allow more than one symbol to have 'option modules' 2013-09-05 11:10:08 +02:00
ksymoops
mod scripts/mod/modpost.c: permit '.cranges' secton for sh64 architecture. 2013-08-20 15:37:40 +09:30
package Provide version number for Debian firmware package 2013-08-15 18:01:18 +02:00
rt-tester
selinux
tracing
.gitignore
Kbuild.include
Lindent
Makefile
Makefile.asm-generic
Makefile.build
Makefile.clean
Makefile.fwinst
Makefile.headersinst
Makefile.help
Makefile.host
Makefile.lib Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2013-07-10 16:05:40 -07:00
Makefile.modbuiltin
Makefile.modinst
Makefile.modpost
Makefile.modsign
asn1_compiler.c
bin2c.c
bloat-o-meter
bootgraph.pl
checkincludes.pl
checkkconfigsymbols.sh scripts/checkkconfigsymbols.sh: replace echo -e with printf 2013-08-28 17:00:47 +02:00
checkpatch.pl checkpatch: add test for positional misuse of section specifiers like __initdata 2013-09-11 15:58:49 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck Coccinelle: Update information about the minimal version required 2013-07-03 22:58:20 +02:00
config scripts/config: use sed's POSIX interface 2013-08-15 22:48:07 +02:00
conmakehash.c
decodecode
depmod.sh
diffconfig diffconfig: Update script to support python versions 2.5 through 3.3 2013-09-01 21:24:51 +02:00
docproc.c
export_report.pl
extract-ikconfig
extract-vmlinux
gcc-goto.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh
get_maintainer.pl
gfp-translate
headerdep.pl
headers.sh
headers_check.pl
headers_install.sh
kallsyms.c
kernel-doc
link-vmlinux.sh
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
mkversion
module-common.lds
namespace.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
recordmcount.c
recordmcount.h
recordmcount.pl tile: support ftrace on tilegx 2013-08-30 10:20:13 -04:00
setlocalversion
show_delta
sign-file
sortextable.c scripts: remove unused function in sortextable.c 2013-07-25 16:20:33 +02:00
sortextable.h
tags.sh
unifdef.c
ver_linux
xz_wrap.sh