diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-13 00:29:20 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-13 00:29:20 -0400 |
| commit | c1fdb2d3389c5a1e7c559a37a4967c1d2580e75c (patch) | |
| tree | e4ed8dd46b9f6fbb6c715e66630e7bdaf71c86ab /scripts | |
| parent | 1700ff823b27b6572cf4c3cec66d279baa1a5d30 (diff) | |
| parent | 7fa0e6db3cedc9b70d68a4170f1352e2b1aa0f90 (diff) | |
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild misc updates from Michal Marek:
"This is the non-critical part of kbuild for v3.16-rc1:
- make deb-pkg can do s390x and arm64
- new patterns in scripts/tags.sh
- scripts/tags.sh skips userspace tools' sources (which sometimes
have copies of kernel structures) and symlinks
- improvements to the objdiff tool
- two new coccinelle patches
- other minor fixes"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts: objdiff: support directories for the augument of record command
scripts: objdiff: fix a comment
scripts: objdiff: change the extension of disassembly from .o to .dis
scripts: objdiff: improve path flexibility for record command
scripts: objdiff: remove unnecessary code
scripts: objdiff: direct error messages to stderr
scripts: objdiff: get the path to .tmp_objdiff more simply
deb-pkg: Add automatic support for s390x architecture
coccicheck: Add unneeded return variable test
kbuild: Fix a typo in documentation
kbuild: trivial - use tabs for code indent where possible
kbuild: trivial - remove trailing empty lines
coccinelle: Check for missing NULL terminators in of_device_id tables
scripts/tags.sh: ignore symlink'ed source files
scripts/tags.sh: add regular expression replacement pattern for memcg
builddeb: add arm64 in the supported architectures
builddeb: use $OBJCOPY variable instead of objcopy
scripts/tags.sh: ignore code of user space tools
scripts/tags.sh: add pattern for DEFINE_HASHTABLE
.gitignore: ignore Module.symvers in all directories
Diffstat (limited to 'scripts')
48 files changed, 290 insertions, 159 deletions
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic index d17e0ea911ed..045e0098e962 100644 --- a/scripts/Makefile.asm-generic +++ b/scripts/Makefile.asm-generic | |||
| @@ -21,4 +21,3 @@ all: $(patsubst %, $(obj)/%, $(generic-y)) | |||
| 21 | 21 | ||
| 22 | $(obj)/%.h: | 22 | $(obj)/%.h: |
| 23 | $(call cmd,wrap) | 23 | $(call cmd,wrap) |
| 24 | |||
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 0f0d6ba87e42..66893643fd7d 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
| @@ -167,4 +167,3 @@ $(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE | |||
| 167 | 167 | ||
| 168 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ | 168 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ |
| 169 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) | 169 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) |
| 170 | |||
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 078fe1d64e7d..b30406860b73 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
| @@ -409,10 +409,10 @@ static void print_deps(void) | |||
| 409 | exit(2); | 409 | exit(2); |
| 410 | } | 410 | } |
| 411 | if (fstat(fd, &st) < 0) { | 411 | if (fstat(fd, &st) < 0) { |
| 412 | fprintf(stderr, "fixdep: error fstat'ing depfile: "); | 412 | fprintf(stderr, "fixdep: error fstat'ing depfile: "); |
| 413 | perror(depfile); | 413 | perror(depfile); |
| 414 | exit(2); | 414 | exit(2); |
| 415 | } | 415 | } |
| 416 | if (st.st_size == 0) { | 416 | if (st.st_size == 0) { |
| 417 | fprintf(stderr,"fixdep: %s is empty\n",depfile); | 417 | fprintf(stderr,"fixdep: %s is empty\n",depfile); |
| 418 | close(fd); | 418 | close(fd); |
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 544aa56b6200..c05d586b1fee 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl | |||
| @@ -173,4 +173,3 @@ while (my $line = <STDIN>) { | |||
| 173 | 173 | ||
| 174 | # Sort output by size (last field) | 174 | # Sort output by size (last field) |
| 175 | print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; | 175 | print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; |
| 176 | |||
diff --git a/scripts/coccinelle/misc/of_table.cocci b/scripts/coccinelle/misc/of_table.cocci new file mode 100644 index 000000000000..3c934046a060 --- /dev/null +++ b/scripts/coccinelle/misc/of_table.cocci | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /// Make sure of_device_id tables are NULL terminated | ||
| 2 | // | ||
| 3 | // Keywords: of_table | ||
| 4 | // Confidence: Medium | ||
| 5 | // Options: --include-headers | ||
| 6 | |||
| 7 | virtual patch | ||
| 8 | virtual context | ||
| 9 | virtual org | ||
| 10 | virtual report | ||
| 11 | |||
| 12 | @depends on context@ | ||
| 13 | identifier var, arr; | ||
| 14 | expression E; | ||
| 15 | @@ | ||
| 16 | struct of_device_id arr[] = { | ||
| 17 | ..., | ||
| 18 | { | ||
| 19 | .var = E, | ||
| 20 | * } | ||
| 21 | }; | ||
| 22 | |||
| 23 | @depends on patch@ | ||
| 24 | identifier var, arr; | ||
| 25 | expression E; | ||
| 26 | @@ | ||
| 27 | struct of_device_id arr[] = { | ||
| 28 | ..., | ||
| 29 | { | ||
| 30 | .var = E, | ||
| 31 | - } | ||
| 32 | + }, | ||
| 33 | + { } | ||
| 34 | }; | ||
| 35 | |||
| 36 | @r depends on org || report@ | ||
| 37 | position p1; | ||
| 38 | identifier var, arr; | ||
| 39 | expression E; | ||
| 40 | @@ | ||
| 41 | struct of_device_id arr[] = { | ||
| 42 | ..., | ||
| 43 | { | ||
| 44 | .var = E, | ||
| 45 | } | ||
| 46 | @p1 | ||
| 47 | }; | ||
| 48 | |||
| 49 | @script:python depends on org@ | ||
| 50 | p1 << r.p1; | ||
| 51 | arr << r.arr; | ||
| 52 | @@ | ||
| 53 | |||
| 54 | cocci.print_main(arr,p1) | ||
| 55 | |||
| 56 | @script:python depends on report@ | ||
| 57 | p1 << r.p1; | ||
| 58 | arr << r.arr; | ||
| 59 | @@ | ||
| 60 | |||
| 61 | msg = "%s is not NULL terminated at line %s" % (arr, p1[0].line) | ||
| 62 | coccilib.report.print_report(p1[0],msg) | ||
diff --git a/scripts/coccinelle/misc/returnvar.cocci b/scripts/coccinelle/misc/returnvar.cocci new file mode 100644 index 000000000000..605955a91c44 --- /dev/null +++ b/scripts/coccinelle/misc/returnvar.cocci | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /// | ||
| 2 | /// Removes unneeded variable used to store return value. | ||
| 3 | /// | ||
| 4 | // Confidence: Moderate | ||
| 5 | // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2. | ||
| 6 | // URL: http://coccinelle.lip6.fr/ | ||
| 7 | // Comments: Comments on code can be deleted if near code that is removed. | ||
| 8 | // "when strict" can be removed to get more hits, but adds false | ||
| 9 | |||
