aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-01-02 08:02:06 -0500
committerMichal Marek <mmarek@suse.cz>2014-01-02 08:02:06 -0500
commit37e2c2a775fc887acd1432908478dfd532f7f00f (patch)
treee51ebc699d8e262fd47e0913be6a711cb1a7b565 /scripts
parent1c8ddae09f4c102b97c9086cc70347e89468a547 (diff)
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
Merge commit v3.13-rc1 into kbuild/misc
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.modpost4
-rw-r--r--scripts/asn1_compiler.c2
-rwxr-xr-xscripts/bloat-o-meter7
-rwxr-xr-xscripts/checkpatch.pl171
-rw-r--r--scripts/docproc.c14
-rw-r--r--scripts/gen_initramfs_list.sh24
-rw-r--r--scripts/kallsyms.c18
-rw-r--r--scripts/kconfig/expr.h2
-rw-r--r--scripts/kconfig/mconf.c60
-rw-r--r--scripts/kconfig/menu.c11
-rw-r--r--scripts/kconfig/qconf.cc5
-rw-r--r--scripts/kconfig/qconf.h1
-rw-r--r--scripts/kconfig/symbol.c2
-rw-r--r--scripts/kconfig/zconf.l1
-rwxr-xr-xscripts/kernel-doc6
-rw-r--r--scripts/link-vmlinux.sh2
-rw-r--r--scripts/mod/modpost.c37
-rw-r--r--scripts/mod/sumversion.c2
-rw-r--r--scripts/package/Makefile4
-rwxr-xr-xscripts/recordmcount.pl4
-rw-r--r--scripts/sortextable.c24
-rw-r--r--scripts/sortextable.h26
22 files changed, 303 insertions, 124 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 8dcdca27d836..69f0a1417e9a 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -79,9 +79,11 @@ modpost = scripts/mod/modpost \
79 $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ 79 $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
80 $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) 80 $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
81 81
82MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))
83
82# We can go over command line length here, so be careful. 84# We can go over command line length here, so be careful.
83quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules 85quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
84 cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) -s -T - 86 cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) $(MODPOST_OPT) -s -T -
85 87
86PHONY += __modpost 88PHONY += __modpost
87__modpost: $(modules:.ko=.o) FORCE 89__modpost: $(modules:.ko=.o) FORCE
diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c
index db0e5cd34c70..91c4117637ae 100644
--- a/scripts/asn1_compiler.c
+++ b/scripts/asn1_compiler.c
@@ -1353,6 +1353,8 @@ static void render_out_of_line_list(FILE *out)
1353 render_opcode(out, "ASN1_OP_END_SET_OF%s,\n", act); 1353 render_opcode(out, "ASN1_OP_END_SET_OF%s,\n", act);
1354 render_opcode(out, "_jump_target(%u),\n", entry); 1354 render_opcode(out, "_jump_target(%u),\n", entry);
1355 break; 1355 break;
1356 default:
1357 break;
1356 } 1358 }
1357 if (e->action) 1359 if (e->action)
1358 render_opcode(out, "_action(ACT_%s),\n", 1360 render_opcode(out, "_action(ACT_%s),\n",
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 6129020c41a9..549d0ab8c662 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -19,9 +19,10 @@ def getsizes(file):
19 size, type, name = l[:-1].split() 19 size, type, name = l[:-1].split()
20 if type in "tTdDbBrR": 20 if type in "tTdDbBrR":
21 # strip generated symbols 21 # strip generated symbols
22 if name[:6] == "__mod_": continue 22 if name.startswith("__mod_"): continue
23 # function names begin with '.' on 64-bit powerpc 23 if name == "linux_banner": continue
24 if "." in name[1:]: name = "static." + name.split(".")[0] 24 # statics and some other optimizations adds random .NUMBER
25 name = re.sub(r'\.[0-9]+', '', name)
25 sym[name] = sym.get(name, 0) + int(size, 16) 26 sym[name] = sym.get(name, 0) + int(size, 16)
26 return sym 27 return sym
27 28
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 47016c304c84..9c9810030377 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -241,8 +241,11 @@ our $Sparse = qr{
241 __ref| 241 __ref|
242 __rcu 242 __rcu
243 }x; 243 }x;
244 244our $InitAttributePrefix = qr{__(?:mem|cpu|dev|net_|)};
245our $InitAttribute = qr{__(?:mem|cpu|dev|net_|)(?:initdata|initconst|init\b)}; 245our $InitAttributeData = qr{$InitAttributePrefix(?:initdata\b)};
246our $InitAttributeConst = qr{$InitAttributePrefix(?:initconst\b)};
247our $InitAttributeInit = qr{$InitAttributePrefix(?:init\b)};
248our $InitAttribute = qr{$InitAttributeData|$InitAttributeConst|$InitAttributeInit};
246 249
247# Notes to $Attribute: 250# Notes to $Attribute:
248# We need \b after 'init' otherwise 'initconst' will cause a false positive in a check 251# We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
@@ -323,7 +326,8 @@ our $logFunctions = qr{(?x:
323 (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| 326 (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
324 WARN(?:_RATELIMIT|_ONCE|)| 327 WARN(?:_RATELIMIT|_ONCE|)|
325 panic| 328 panic|
326 MODULE_[A-Z_]+ 329 MODULE_[A-Z_]+|
330 seq_vprintf|seq_printf|seq_puts
327)}; 331)};
328 332
329our $signature_tags = qr{(?xi: 333our $signature_tags = qr{(?xi:
@@ -442,8 +446,9 @@ sub seed_camelcase_file {
442 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/); 446 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
443 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) { 447 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
444 $camelcase{$1} = 1; 448 $camelcase{$1} = 1;
445 } 449 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
446 elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*\(/) { 450 $camelcase{$1} = 1;
451 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
447 $camelcase{$1} = 1; 452 $camelcase{$1} = 1;
448 } 453 }
449 } 454 }
@@ -1512,6 +1517,14 @@ sub rtrim {
1512 return $string; 1517 return $string;
1513} 1518}
1514 1519
1520sub string_find_replace {
1521 my ($string, $find, $replace) = @_;
1522
1523 $string =~ s/$find/$replace/g;
1524
1525 return $string;
1526}
1527
1515sub tabify { 1528sub tabify {
1516 my ($leading) = @_; 1529 my ($leading) = @_;
1517 1530
@@ -1612,6 +1625,8 @@ sub process {
1612 my @setup_docs = (); 1625 my @setup_docs = ();
1613 my $setup_docs = 0; 1626 my $setup_docs = 0;
1614 1627
1628 my $camelcase_file_seeded = 0;
1629
1615 sanitise_line_reset(); 1630 sanitise_line_reset();
1616 my $line; 1631 my $line;
1617 foreach my $rawline (@rawlines) { 1632 foreach my $rawline (@rawlines) {
@@ -1754,11 +1769,11 @@ sub process {
1754 # extract the filename as it passes 1769 # extract the filename as it passes
1755 if ($line =~ /^diff --git.*?(\S+)$/) { 1770 if ($line =~ /^diff --git.*?(\S+)$/) {
1756 $realfile = $1; 1771 $realfile = $1;
1757 $realfile =~ s@^([^/]*)/@@; 1772 $realfile =~ s@^([^/]*)/@@ if (!$file);
1758 $in_commit_log = 0; 1773 $in_commit_log = 0;
1759 } elsif ($line =~ /^\+\+\+\s+(\S+)/) { 1774 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
1760 $realfile = $1; 1775 $realfile = $1;
1761 $realfile =~ s@^([^/]*)/@@; 1776 $realfile =~ s@^([^/]*)/@@ if (!$file);
1762 $in_commit_log = 0; 1777 $in_commit_log = 0;
1763 1778
1764 $p1_prefix = $1; 1779 $p1_prefix = $1;
@@ -1947,6 +1962,18 @@ sub process {
1947 $rpt_cleaners = 1; 1962 $rpt_cleaners = 1;
1948 } 1963 }
1949 1964
1965# Check for FSF mailing addresses.
1966 if ($rawline =~ /You should have received a copy/ ||
1967 $rawline =~ /write to the Free Software/ ||
1968 $rawline =~ /59 Temple Place/ ||
1969 $rawline =~ /51 Franklin Street/) {
1970 my $herevet = "$here\n" . cat_vet($rawline) . "\n";
1971 my $msg_type = \&ERROR;
1972 $msg_type = \&CHK if ($file);
1973 &{$msg_type}("FSF_MAILING_ADDRESS",
1974 "Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL.\n" . $herevet)
1975 }
1976
1950# check for Kconfig help text having a real description 1977# check for Kconfig help text having a real description
1951# Only applies when adding the entry originally, after that we do not have 1978# Only applies when adding the entry originally, after that we do not have
1952# sufficient context to determine whether it is indeed long enough. 1979# sufficient context to determine whether it is indeed long enough.
@@ -2838,7 +2865,7 @@ sub process {
2838 \+=|-=|\*=|\/=|%=|\^=|\|=|&=| 2865 \+=|-=|\*=|\/=|%=|\^=|\|=|&=|
2839 =>|->|<<|>>|<|>|=|!|~| 2866 =>|->|<<|>>|<|>|=|!|~|
2840 &&|\|\||,|\^|\+\+|--|&|\||\+|-|\*|\/|%| 2867 &&|\|\||,|\^|\+\+|--|&|\||\+|-|\*|\/|%|
2841 \?|: 2868 \?:|\?|:
2842 }x; 2869 }x;
2843 my @elements = split(/($ops|;)/, $opline); 2870 my @elements = split(/($ops|;)/, $opline);