android_kernel_google_msm/scripts
Patrick Pannuto d917e71c27 Checkpatch: Backport changes from 2.6.35
Backport a series of checkpatch changes from 2.6.35; having
these checks in our tree now will help with upstreaming
efforts.

A summary of the changes:

(trivial) remove Dave Jones' email
Add initconst attribute
Switch printk exception to logFunctions
check for spaces before a quoted newline
check for space before tabs
improved check spacing on parentheses
improved conditional checking
add some exceptions to multi-statement macro exceptions
Check that the storage class is at the beginning of a declaration
check for sizeof(&)
check for various ops structs, ensure they are const.
check for lockdep_set_novalidate_class

The following commits are included:

commit dbf004d788
Author: Dave Jones <davej@redhat.com>
Date:   Tue Jan 12 16:59:52 2010 -0500

    remove my email address from checkpatch.

    Maybe this will stop people emailing me about it.

    Signed-off-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 52131292c0
Author: Wolfram Sang <w.sang@pengutronix.de>
Date:   Fri Mar 5 13:43:51 2010 -0800

    checkpatch: fix false positive on __initconst

    checkpatch falsely complained about '__initconst' because it thought the
    'const' needed a space before.  Fix this by changing the list of
    attributes:

    - add '__initconst'
    - force plain 'init' to contain a word-boundary at the end

    Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 691e669ba8
Author: Joe Perches <joe@perches.com>
Date:   Fri Mar 5 13:43:51 2010 -0800

    checkpatch.pl: allow > 80 char lines for logging functions not just printk

    Signed-off-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>

commit 3354957a4f
Author: Andi Kleen <ak@linux.intel.com>
Date:   Mon May 24 14:33:29 2010 -0700

    checkpatch: add check for too short Kconfig descriptions

    I've seen various new Kconfigs with rather unhelpful one liner
    descriptions.  Add a Kconfig warning for a minimum length of the Kconfig
    help section.

    Right now I arbitarily chose 4. The exact value can be debated.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 5e79d96eed
Author: Joe Perches <joe@perches.com>
Date:   Fri Mar 5 13:43:55 2010 -0800

    checkpatch: warn on unnecessary spaces before quoted newlines

    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 08e4436566
Author: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Date:   Fri Mar 5 13:43:54 2010 -0800

    checkpatch.pl: warn if an adding line introduce spaces before tabs.

    Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 42bdf74c95
Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Date:   Fri Mar 5 13:43:50 2010 -0800

    checkpatch: trivial fix for trailing statements check

    In case if the statement and the conditional are in one line, the line
    appears in the report doubly.

    And items of this check have no blank line before the next item.

    This patch fixes these trivial problems, to improve readability of the
    report.

    [sample.c]
      > if (cond1
      >        && cond2
      >        && cond3) func_foo();
      >
      > if (cond4) func_bar();

    Before:
      > ERROR: trailing statements should be on next line
      > #1: FILE: sample.c:1:
      > +if (cond1
      > [...]
      > +       && cond3) func_foo();
      > ERROR: trailing statements should be on next line
      > #5: FILE: sample.c:5:
      > +if (cond4) func_bar();
      > +if (cond4) func_bar();
      > total: 2 errors, 0 warnings, 5 lines checked

    After:
      > ERROR: trailing statements should be on next line
      > #1: FILE: sample.c:1:
      > +if (cond1
      > [...]
      > +       && cond3) func_foo();
      >
      > ERROR: trailing statements should be on next line
      > #5: FILE: sample.c:5:
      > +if (cond4) func_bar();
      >
      > total: 2 errors, 0 warnings, 5 lines checked

    Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.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>

commit 22fd2d3e4f
Author: Stefani Seibold <stefani@seibold.net>
Date:   Fri Mar 5 13:43:52 2010 -0800

    checkpatch.pl: add union and struct to the exceptions list

    Here is a small code snippet, which will be complained about by
    checkpatch.pl:

    #define __STRUCT_KFIFO_COMMON(recsize, ptrtype) \
        union { \
                struct { \
                        unsigned int    in; \
                        unsigned int    out; \
                }; \
                char            rectype[recsize]; \
                ptrtype         *ptr; \
                const ptrtype   *ptr_const; \
        };

    This construct is legal and safe, so checkpatch.pl should accept this.  It
    should be also true for struct defined in a macro.

    Add the `struct' and `union' keywords to the exceptions list of the
    checkpatch.pl script, to prevent error message "Macros with multiple
    statements should be enclosed in a do - while loop".  Otherwise it is not
    possible to build a struct or union with a macro.

    Signed-off-by: Stefani Seibold <stefani@seibold.net>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit d4977c78e9
Author: Tobias Klauser <tklauser@distanz.ch>
Date:   Mon May 24 14:33:30 2010 -0700

    checkpatch: warn on declaration with storage class not at the beginning

    The C99 specification states in section 6.11.5:

    The placement of a storage-class specifier other than at the beginning
    of the declaration specifiers in a declaration is an obsolescent
    feature.

    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Acked-by: Jean Delvare <khali@linux-fr.org>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 8f53a9b80f
Author: Joe Perches <joe@perches.com>
Date:   Fri Mar 5 13:43:48 2010 -0800

    scripts/checkpatch.pl: add WARN on sizeof(&foo)

    sizeof(&foo) is frequently an error.  Warn on its use.

    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 79404849e9
Author: Emese Revfy <re.emese@gmail.com>
Date:   Fri Mar 5 13:43:53 2010 -0800

    checkpatch.pl: extend list of expected-to-be-const structures

    Based on Arjan's suggestion, extend the list of ops structures that should
    be const.

    Signed-off-by: Emese Revfy <re.emese@gmail.com>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Cc: Arjan van de Ven <arjan@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 1704f47b50
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Fri Mar 19 01:37:42 2010 +0100

    lockdep: Add novalidate class for dev->mutex conversion

    The conversion of device->sem to device->mutex resulted in lockdep
    warnings. Create a novalidate class for now until the driver folks
    come up with separate classes. That way we have at least the basic
    mutex debugging coverage.

    Add a checkpatch error so the usage is reserved for device->mutex.

    [ tglx: checkpatch and compile fix for LOCKDEP=n ]

    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Change-Id: I11495554d7d393659e5e0d7188cdc1744e25b6ba
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
(cherry picked from commit 4657bf482381583b08b34ed5ea6f7d3ad162807c)

Conflicts:

	scripts/checkpatch.pl
2013-02-20 02:49:54 -08:00
..
basic fixdep: fix extraneous dependencies 2011-09-09 11:45:47 +02:00
coccinelle Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
dtc scripts: dtc: fix compile warnings 2012-03-24 23:07:35 +01:00
genksyms scripts/genksyms: clean lex/yacc generated files 2012-01-08 14:48:15 +01:00
kconfig kconfig: delete last traces of __enabled_ from autoconf.h 2012-04-12 18:35:58 -07:00
ksymoops
mod modpost: Make verbose mismatches errors 2013-02-20 02:49:31 -08:00
package kbuild: Fix out-of-tree build for 'make deb-pkg' 2012-02-25 00:01:28 +01:00
rt-tester Fix common misspellings 2011-03-31 11:26:23 -03:00
selinux Create Documentation/security/, 2011-05-19 15:59:38 -07:00
tracing
.gitignore kbuild: move scripts/basic/docproc.c to scripts/docproc.c 2011-05-02 22:48:03 +02:00
bin2c.c
bloat-o-meter bloat-o-meter: include read-only data section in report 2011-03-22 17:44:17 -07:00
bootgraph.pl bootgraph.pl: relax timing information requirements 2011-06-13 00:04:57 +02:00
build-all.py scripts: Include copper pattern in build targets 2013-02-20 02:49:45 -08:00
checkincludes.pl checkincludes: fix perlcritic warnings 2010-03-07 21:19:57 +01:00
checkkconfigsymbols.sh checkkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters 2010-06-03 10:39:39 +02:00
checkpatch.pl Checkpatch: Backport changes from 2.6.35 2013-02-20 02:49:54 -08:00
checkstack.pl Haavard Skinnemoen has left Atmel 2011-05-18 23:24:50 +02:00
checksyscalls.sh checksyscalls: Use arch/x86/syscalls/syscall_32.tbl as source 2011-11-17 13:35:37 -08:00
checkversion.pl kbuild: don't warn about include/linux/version.h not including itself 2011-04-29 15:38:55 +02:00
cleanfile
cleanpatch
coccicheck coccicheck: change handling of C={1,2} when M= is set 2012-02-24 23:50:19 +01:00
config kbuild: add numeric --set-val option to scripts/config 2010-12-15 15:44:31 +01:00
conmakehash.c
decodecode scripts: decodecode: remove bashisms 2010-06-04 10:26:35 +02:00
depmod.sh kbuild: do not check for ancient modutils tools 2012-01-23 15:12:19 +01:00
diffconfig
docproc.c docproc: cleanup brace placement 2011-06-16 20:40:03 +02:00
export_report.pl export_report: use warn() to issue WARNING, so they go to stderr 2011-05-24 16:07:07 +02:00
extract-ikconfig scripts/extract-ikconfig: add xz compression support 2011-02-10 15:23:03 +01:00
extract-vmlinux scripts: add extract-vmlinux 2011-08-31 16:12:17 +02:00
gcc-goto.sh ARM: 7333/2: jump label: detect %c support for ARM 2012-03-24 09:38:56 +00:00
gcc-version.sh
gcc-wrapper.py scripts: gcc-wrapper: Add an allowed warning for alignment.c 2013-02-20 02:49:38 -08:00
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-05-24 13:31:37 -07:00
get_maintainer.pl get_maintainer.pl: add support for moderated lists 2012-03-23 16:58:32 -07:00
gfp-translate scripts: fix gfp-translate for recent changes to gfp.h 2010-11-25 06:50:49 +09:00
headerdep.pl headerdep: perlcritic warning 2010-03-23 12:26:38 +01:00
headers.sh kbuild, headers.sh: Don't make archheaders explicitly 2011-11-22 14:47:50 -08:00
headers_check.pl headers_check: recursively search for linux/types.h inclusion 2012-03-26 14:54:27 +02:00
headers_install.pl headers_install: fix __packed in exported kernel headers 2011-06-24 16:56:05 +02:00
kallsyms.c scripts/kallsyms.c: fix potential segfault 2011-05-12 17:23:40 +02:00
Kbuild.include scripts/Kbuild.include: Fix portability problem of "echo -e" 2012-03-24 23:32:05 +01:00
kernel-doc scripts/kernel-doc: fix fatal error caused by cfg80211.h 2012-01-23 08:44:53 -08:00
Lindent
Makefile x86, realmode: 16-bit real-mode code support for relocs tool 2012-05-18 19:49:40 -07:00
Makefile.asm-generic kbuild: silence Nothing to be done for 'all' message 2011-06-09 11:48:19 +02:00
Makefile.build kbuild: disable -Wmissing-field-initializers for W=1 2012-01-26 11:07:26 +01:00
Makefile.clean kbuild: Really don't clean bounds.h and asm-offsets.h 2010-03-11 11:15:22 +01:00
Makefile.fwinst
Makefile.headersinst kbuild: Add support for installing generated asm headers 2011-11-17 13:14:36 -08:00
Makefile.help Add a target to use the Coccinelle checker 2010-06-12 00:00:29 +02:00
Makefile.host
Makefile.lib Kbuild: centralize MKIMAGE and cmd_uimage definitions 2012-03-26 15:49:20 +02:00
Makefile.modbuiltin kbuild: Create output directory in Makefile.modbuiltin 2010-06-10 12:23:08 +02:00
Makefile.modinst
Makefile.modpost modpost: Make section mismatches an error 2013-02-20 02:49:31 -08:00
makelst
markup_oops.pl Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
mkcompile_h Fix handling of backlash character in LINUX_COMPILE_BY name 2011-04-29 15:55:45 +02:00
mkmakefile kbuild: silence generated makefile message 2011-07-20 17:08:08 +02:00
mksysmap
mkuboot.sh mkuboot.sh: Fail if mkimage is missing 2011-01-07 14:31:01 +01:00
mkversion
module-common.lds module: Sort exported symbols 2011-05-19 16:55:27 +09:30
namespace.pl Revert "namespace: add source file location exceptions" 2010-10-28 00:59:56 +02:00
patch-kernel scripts/patch-kernel: digest kernel.org hosted .xz patches 2012-03-30 15:23:36 +02:00
pnmtologo.c
profile2linkerlist.pl profile2linkerlist: fix perl warnings 2010-03-07 21:39:33 +01:00
recordmcount.c ftrace/s390: mcount offset calculation 2011-05-16 15:05:06 -04:00
recordmcount.h recordmcount: Fix handling of elf64 big-endian objects. 2012-01-06 17:06:42 -05:00
recordmcount.pl ftrace/s390: mcount offset calculation 2011-05-16 15:05:06 -04:00
setlocalversion setlocalversion: Fix version when built/synced on a tag 2013-02-20 02:49:33 -08:00
show_delta scripts: change scripts to use system python instead of env 2010-02-02 14:33:56 +01:00
tags.sh Subject: [PATCH] tags.sh: Add missing quotes 2012-04-02 11:28:17 +02:00
unifdef.c unifdef: update to upstream version 2.5 2011-01-22 15:50:59 +01:00
ver_linux
xz_wrap.sh xz: Enable BCJ filters on SPARC and 32-bit x86 2012-04-18 13:13:18 -07:00