diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-12 21:22:27 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-12 21:22:27 -0400 |
| commit | 321d03c86732e45f5f33ad0db5b68e2e1364acb9 (patch) | |
| tree | 19007efbd4ea1a09df9e3067d142ca2253fff266 | |
| parent | fd1232b214af43a973443aec6a2808f16ee5bf70 (diff) | |
| parent | f23a9fa7e81f7df65e0bcf586e028a2db736b9e6 (diff) | |
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild changes from Michal Marek:
"Here is the non-critical part of kbuild:
- One bogus coccinelle check removed, one check fixed not to suggest
the obsolete PTR_RET macro
- scripts/tags.sh does not index the generated *.mod.c files
- new objdiff tool to list differences between two versions of an
object file
- A fix for scripts/bootgraph.pl"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts/coccinelle: Use PTR_ERR_OR_ZERO
scripts/bootgraph.pl: Add graphic header
scripts: objdiff: detect object code changes between two commits
Coccicheck: Remove memcpy to struct assignment test
scripts/tags.sh: Ignore *.mod.c
| -rw-r--r-- | Makefile | 7 | ||||
| -rw-r--r-- | scripts/bootgraph.pl | 42 | ||||
| -rw-r--r-- | scripts/coccinelle/api/ptr_ret.cocci | 14 | ||||
| -rw-r--r-- | scripts/coccinelle/misc/memcpy-assign.cocci | 103 | ||||
| -rwxr-xr-x | scripts/objdiff | 141 | ||||
| -rwxr-xr-x | scripts/tags.sh | 9 |
6 files changed, 196 insertions, 120 deletions
| @@ -428,8 +428,9 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve | |||
| 428 | 428 | ||
| 429 | # Files to ignore in find ... statements | 429 | # Files to ignore in find ... statements |
| 430 | 430 | ||
| 431 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ | 431 | export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ |
| 432 | -o -name .pc -o -name .hg -o -name .git \) -prune -o | 432 | -name CVS -o -name .pc -o -name .hg -o -name .git \) \ |
| 433 | -prune -o | ||
| 433 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ | 434 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ |
| 434 | --exclude CVS --exclude .pc --exclude .hg --exclude .git | 435 | --exclude CVS --exclude .pc --exclude .hg --exclude .git |
| 435 | 436 | ||
| @@ -1103,7 +1104,7 @@ CLEAN_DIRS += $(MODVERDIR) | |||
| 1103 | 1104 | ||
| 1104 | # Directories & files removed with 'make mrproper' | 1105 | # Directories & files removed with 'make mrproper' |
| 1105 | MRPROPER_DIRS += include/config usr/include include/generated \ | 1106 | MRPROPER_DIRS += include/config usr/include include/generated \ |
| 1106 | arch/*/include/generated | 1107 | arch/*/include/generated .tmp_objdiff |
| 1107 | MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ | 1108 | MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ |
| 1108 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ | 1109 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ |
| 1109 | signing_key.priv signing_key.x509 x509.genkey \ | 1110 | signing_key.priv signing_key.x509 x509.genkey \ |
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl index b78fca994a15..9ca667bcaee9 100644 --- a/scripts/bootgraph.pl +++ b/scripts/bootgraph.pl | |||
| @@ -38,6 +38,31 @@ | |||
| 38 | # | 38 | # |
| 39 | 39 | ||
| 40 | use strict; | 40 | use strict; |
| 41 | use Getopt::Long; | ||
| 42 | my $header = 0; | ||
| 43 | |||
| 44 | sub help { | ||
| 45 | my $text = << "EOM"; | ||
| 46 | Usage: | ||
| 47 | 1) dmesg | perl scripts/bootgraph.pl [OPTION] > output.svg | ||
| 48 | 2) perl scripts/bootgraph.pl -h | ||
| 49 | |||
| 50 | Options: | ||
| 51 | -header Insert kernel version and date | ||
| 52 | EOM | ||
| 53 | my $std=shift; | ||
| 54 | if ($std == 1) { | ||
| 55 | print STDERR $text; | ||
| 56 | } else { | ||
| 57 | print $text; | ||
| 58 | } | ||
| 59 | exit; | ||
| 60 | } | ||
| 61 | |||
| 62 | GetOptions( | ||
| 63 | 'h|help' =>\&help, | ||
| 64 | 'header' =>\$header | ||
| 65 | ); | ||
| 41 | 66 | ||
| 42 | my %start; | 67 | my %start; |
| 43 | my %end; | 68 | my %end; |
| @@ -49,6 +74,11 @@ my $count = 0; | |||
| 49 | my %pids; | 74 | my %pids; |
| 50 | my %pidctr; | 75 | my %pidctr; |
| 51 | 76 | ||
| 77 | my $headerstep = 20; | ||
| 78 | my $xheader = 15; | ||
| 79 | my $yheader = 25; | ||
| 80 | my $cyheader = 0; | ||
| 81 | |||
| 52 | while (<>) { | 82 | while (<>) { |
| 53 | my $line = $_; | 83 | my $line = $_; |
| 54 | if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_\.]+)\+/) { | 84 | if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_\.]+)\+/) { |
| @@ -112,15 +142,23 @@ if ($count == 0) { | |||
| 112 | print STDERR <<END; | 142 | print STDERR <<END; |
| 113 | No data found in the dmesg. Make sure that 'printk.time=1' and | 143 | No data found in the dmesg. Make sure that 'printk.time=1' and |
| 114 | 'initcall_debug' are passed on the kernel command line. | 144 | 'initcall_debug' are passed on the kernel command line. |
| 115 | Usage: | ||
| 116 | dmesg | perl scripts/bootgraph.pl > output.svg | ||
| 117 | END | 145 | END |
| 146 | help(1); | ||
| 118 | exit 1; | 147 | exit 1; |
| 119 | } | 148 | } |
| 120 | 149 | ||
| 121 | print "<?xml version=\"1.0\" standalone=\"no\"?> \n"; | 150 | print "<?xml version=\"1.0\" standalone=\"no\"?> \n"; |
| 122 | print "<svg width=\"2000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n"; | 151 | print "<svg width=\"2000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n"; |
| 123 | 152 | ||
| 153 | |||
| 154 | if ($header) { | ||
| 155 | my $version = `uname -a`; | ||
| 156 | my $date = `date`; | ||
| 157 | print "<text transform=\"translate($xheader,$yheader)\">Kernel version: $version</text>\n"; | ||
| 158 | $cyheader = $yheader+$headerstep; | ||
| 159 | print "<text transform=\"translate($xheader,$cyheader)\">Date: $date</text>\n"; | ||
| 160 | } | ||
| 161 | |||
| 124 | my @styles; | 162 | my @styles; |
| 125 | 163 | ||
| 126 | $styles[0] = "fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; | 164 | $styles[0] = "fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; |
diff --git a/scripts/coccinelle/api/ptr_ret.cocci b/scripts/coccinelle/api/ptr_ret.cocci index e18f8402e37c..dd58dab5d411 100644 --- a/scripts/coccinelle/api/ptr_ret.cocci +++ b/scripts/coccinelle/api/ptr_ret.cocci | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | // URL: http://coccinelle.lip6.fr/ | 7 | // URL: http://coccinelle.lip6.fr/ |
| 8 | // Options: --no-includes --include-headers | 8 | // Options: --no-includes --include-headers |
| 9 | // | 9 | // |
| 10 | // Keywords: ERR_PTR, PTR_ERR, PTR_RET, PTR_ERR_OR_ZERO | 10 | // Keywords: ERR_PTR, PTR_ERR, PTR_ERR_OR_ZERO |
| 11 | // Version min: 2.6.39 | 11 | // Version min: 2.6.39 |
| 12 | // | 12 | // |
| 13 | 13 | ||
| @@ -62,35 +62,35 @@ position p3; | |||
| 62 | p << r1.p1; | 62 | p << r1.p1; |
| 63 | @@ | 63 | @@ |
| 64 | 64 | ||
| 65 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | 65 | coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | @script:python depends on org@ | 68 | @script:python depends on org@ |
| 69 | p << r2.p2; | 69 | p << r2.p2; |
| 70 | @@ | 70 | @@ |
| 71 | 71 | ||
| 72 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | 72 | coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 73 | 73 | ||
| 74 | @script:python depends on org@ | 74 | @script:python depends on org@ |
| 75 | p << r3.p3; | 75 | p << r3.p3; |
| 76 | @@ | 76 | @@ |
| 77 | 77 | ||
| 78 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | 78 | coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 79 | 79 | ||
| 80 | @script:python depends on report@ | 80 | @script:python depends on report@ |
| 81 | p << r1.p1; | 81 | p << r1.p1; |
| 82 | @@ | 82 | @@ |
| 83 | 83 | ||
| 84 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | 84 | coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 85 | 85 | ||
| 86 | @script:python depends on report@ | 86 | @script:python depends on report@ |
| 87 | p << r2.p2; | 87 | p << r2.p2; |
| 88 | @@ | 88 | @@ |
| 89 | 89 | ||
| 90 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | 90 | coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
| 91 | 91 | ||
| 92 | @script:python depends on report@ | 92 | @script:python depends on report@ |
| 93 | p << r3.p3; | 93 | p << r3.p3; |
| 94 | @@ | 94 | @@ |
| 95 | 95 | ||
| 96 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | 96 | coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") |
diff --git a/scripts/coccinelle/misc/memcpy-assign.cocci b/scripts/coccinelle/misc/memcpy-assign.cocci deleted file mode 100644 index afd058be497f..000000000000 --- a/scripts/coccinelle/misc/memcpy-assign.cocci +++ /dev/null | |||
| @@ -1,103 +0,0 @@ | |||
| 1 | // | ||
| 2 | // Replace memcpy with struct assignment. | ||
| 3 | // | ||
| 4 | // Confidence: High | ||
| 5 | // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2. | ||
| 6 | // URL: http://coccinelle.lip6.fr/ | ||
| 7 | // Comments: | ||
| 8 | // Options: --no-includes --include-headers | ||
| 9 | |||
| 10 | |||
