diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2013-01-29 04:48:30 -0500 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2013-01-29 04:48:30 -0500 |
| commit | 617677295b53a40d0e54aac4cbbc216ffbc755dd (patch) | |
| tree | 51b9e87213243ed5efff252c8e8d8fec4eebc588 /scripts | |
| parent | 5c8d1b68e01a144813e38795fe6dbe7ebb506131 (diff) | |
| parent | 6abb7c25775b7fb2225ad0508236d63ca710e65f (diff) | |
Merge branch 'master' into for-next
Conflicts:
drivers/devfreq/exynos4_bus.c
Sync with Linus' tree to be able to apply patches that are
against newer code (mvneta).
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.lib | 3 | ||||
| -rw-r--r-- | scripts/Makefile.modinst | 3 | ||||
| -rw-r--r-- | scripts/Makefile.modsign | 32 | ||||
| -rwxr-xr-x | scripts/checkpatch.pl | 156 | ||||
| -rw-r--r-- | scripts/coccinelle/api/d_find_alias.cocci | 80 | ||||
| -rw-r--r-- | scripts/coccinelle/misc/warn.cocci | 109 | ||||
| -rwxr-xr-x | scripts/config | 1 | ||||
| -rw-r--r-- | scripts/dtc/Makefile | 2 | ||||
| -rw-r--r-- | scripts/headers_install.pl | 3 | ||||
| -rw-r--r-- | scripts/kconfig/expr.h | 5 | ||||
| -rw-r--r-- | scripts/kconfig/list.h | 91 | ||||
| -rw-r--r-- | scripts/kconfig/lkc_proto.h | 4 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 6 | ||||
| -rw-r--r-- | scripts/kconfig/menu.c | 14 | ||||
| -rwxr-xr-x | scripts/kernel-doc | 1 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 24 | ||||
| -rw-r--r-- | scripts/pnmtologo.c | 7 | ||||
| -rwxr-xr-x | scripts/sign-file | 6 | ||||
| -rw-r--r-- | scripts/sortextable.c | 1 | ||||
| -rwxr-xr-x | scripts/tags.sh | 57 |
20 files changed, 499 insertions, 106 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0be6f110cce7..bdf42fdf64c9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -266,6 +266,9 @@ $(obj)/%.dtb.S: $(obj)/%.dtb | |||
| 266 | quiet_cmd_dtc = DTC $@ | 266 | quiet_cmd_dtc = DTC $@ |
| 267 | cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< | 267 | cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< |
| 268 | 268 | ||
| 269 | $(obj)/%.dtb: $(src)/%.dts FORCE | ||
| 270 | $(call if_changed_dep,dtc) | ||
| 271 | |||
| 269 | # Bzip2 | 272 | # Bzip2 |
| 270 | # --------------------------------------------------------------------------- | 273 | # --------------------------------------------------------------------------- |
| 271 | 274 | ||
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index dda4b2b61927..ecbb44797e28 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst | |||
| @@ -16,8 +16,9 @@ PHONY += $(modules) | |||
| 16 | __modinst: $(modules) | 16 | __modinst: $(modules) |
| 17 | @: | 17 | @: |
| 18 | 18 | ||
| 19 | # Don't stop modules_install if we can't sign external modules. | ||
| 19 | quiet_cmd_modules_install = INSTALL $@ | 20 | quiet_cmd_modules_install = INSTALL $@ |
| 20 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) | 21 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) |
| 21 | 22 | ||
| 22 | # Modules built outside the kernel source tree go into extra by default | 23 | # Modules built outside the kernel source tree go into extra by default |
| 23 | INSTALL_MOD_DIR ?= extra | 24 | INSTALL_MOD_DIR ?= extra |
diff --git a/scripts/Makefile.modsign b/scripts/Makefile.modsign new file mode 100644 index 000000000000..abfda626dbad --- /dev/null +++ b/scripts/Makefile.modsign | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # ========================================================================== | ||
| 2 | # Signing modules | ||
| 3 | # ========================================================================== | ||
| 4 | |||
| 5 | PHONY := __modsign | ||
| 6 | __modsign: | ||
| 7 | |||
| 8 | include scripts/Kbuild.include | ||
| 9 | |||
| 10 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) | ||
| 11 | modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) | ||
| 12 | |||
| 13 | PHONY += $(modules) | ||
| 14 | __modsign: $(modules) | ||
| 15 | @: | ||
| 16 | |||
| 17 | quiet_cmd_sign_ko = SIGN [M] $(2)/$(notdir $@) | ||
| 18 | cmd_sign_ko = $(mod_sign_cmd) $(2)/$(notdir $@) | ||
| 19 | |||
| 20 | # Modules built outside the kernel source tree go into extra by default | ||
| 21 | INSTALL_MOD_DIR ?= extra | ||
| 22 | ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D)) | ||
| 23 | |||
| 24 | modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D)) | ||
| 25 | |||
| 26 | $(modules): | ||
| 27 | $(call cmd,sign_ko,$(MODLIB)/$(modinst_dir)) | ||
| 28 | |||
| 29 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
| 30 | # information in a variable se we can use it in if_changed and friends. | ||
| 31 | |||
| 32 | .PHONY: $(PHONY) | ||
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 21a9f5de0a21..4d2c7dfdaabd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -33,6 +33,7 @@ my %ignore_type = (); | |||
| 33 | my @ignore = (); | 33 | my @ignore = (); |
| 34 | my $help = 0; | 34 | my $help = 0; |
| 35 | my $configuration_file = ".checkpatch.conf"; | 35 | my $configuration_file = ".checkpatch.conf"; |
| 36 | my $max_line_length = 80; | ||
| 36 | 37 | ||
| 37 | sub help { | 38 | sub help { |
| 38 | my ($exitcode) = @_; | 39 | my ($exitcode) = @_; |
| @@ -51,6 +52,7 @@ Options: | |||
| 51 | -f, --file treat FILE as regular source file | 52 | -f, --file treat FILE as regular source file |
| 52 | --subjective, --strict enable more subjective tests | 53 | --subjective, --strict enable more subjective tests |
| 53 | --ignore TYPE(,TYPE2...) ignore various comma separated message types | 54 | --ignore TYPE(,TYPE2...) ignore various comma separated message types |
| 55 | --max-line-length=n set the maximum line length, if exceeded, warn | ||
| 54 | --show-types show the message "types" in the output | 56 | --show-types show the message "types" in the output |
| 55 | --root=PATH PATH to the kernel tree root | 57 | --root=PATH PATH to the kernel tree root |
| 56 | --no-summary suppress the per-file summary | 58 | --no-summary suppress the per-file summary |
| @@ -107,6 +109,7 @@ GetOptions( | |||
| 107 | 'strict!' => \$check, | 109 | 'strict!' => \$check, |
| 108 | 'ignore=s' => \@ignore, | 110 | 'ignore=s' => \@ignore, |
| 109 | 'show-types!' => \$show_types, | 111 | 'show-types!' => \$show_types, |
| 112 | 'max-line-length=i' => \$max_line_length, | ||
| 110 | 'root=s' => \$root, | 113 | 'root=s' => \$root, |
| 111 | 'summary!' => \$summary, | 114 | 'summary!' => \$summary, |
| 112 | 'mailback!' => \$mailback, | 115 | 'mailback!' => \$mailback, |
| @@ -227,7 +230,11 @@ our $Inline = qr{inline|__always_inline|noinline}; | |||
| 227 | our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; | 230 | our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; |
| 228 | our $Lval = qr{$Ident(?:$Member)*}; | 231 | our $Lval = qr{$Ident(?:$Member)*}; |
| 229 | 232 | ||
| 230 | our $Constant = qr{(?i:(?:[0-9]+|0x[0-9a-f]+)[ul]*)}; | 233 | our $Float_hex = qr{(?i:0x[0-9a-f]+p-?[0-9]+[fl]?)}; |
| 234 | our $Float_dec = qr{(?i:((?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:e-?[0-9]+)?[fl]?))}; | ||
| 235 | our $Float_int = qr{(?i:[0-9]+e-?[0-9]+[fl]?)}; | ||
| 236 | our $Float = qr{$Float_hex|$Float_dec|$Float_int}; | ||
| 237 | our $Constant = qr{(?:$Float|(?i:(?:0x[0-9a-f]+|[0-9]+)[ul]*))}; | ||
| 231 | our $Assignment = qr{(?:\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=)}; | 238 | our $Assignment = qr{(?:\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=)}; |
| 232 | our $Compare = qr{<=|>=|==|!=|<|>}; | 239 | our $Compare = qr{<=|>=|==|!=|<|>}; |
| 233 | our $Operators = qr{ | 240 | our $Operators = qr{ |
| @@ -352,27 +359,6 @@ sub deparenthesize { | |||
| 352 | 359 | ||
| 353 | $chk_signoff = 0 if ($file); | 360 | $chk_signoff = 0 if ($file); |
| 354 | 361 | ||
| 355 | my @dep_includes = (); | ||
| 356 | my @dep_functions = (); | ||
| 357 | my $removal = "Documentation/feature-removal-schedule.txt"; | ||
| 358 | if ($tree && -f "$root/$removal") { | ||
| 359 | open(my $REMOVE, '<', "$root/$removal") || | ||
| 360 | die "$P: $removal: open failed - $!\n"; | ||
| 361 | while (<$REMOVE>) { | ||
| 362 | if (/^Check:\s+(.*\S)/) { | ||
| 363 | for my $entry (split(/[, ]+/, $1)) { | ||
| 364 | if ($entry =~ m@include/(.*)@) { | ||
| 365 | push(@dep_includes, $1); | ||
| 366 | |||
| 367 | } elsif ($entry !~ m@/@) { | ||
| 368 | push(@dep_functions, $entry); | ||
| 369 | } | ||
| 370 | } | ||
| 371 | } | ||
| 372 | } | ||
| 373 | close($REMOVE); | ||
| 374 | } | ||
| 375 | |||
| 376 | my @rawlines = (); | 362 | my @rawlines = (); |
| 377 | my @lines = (); | 363 | my @lines = (); |
| 378 | my $vname; | 364 | my $vname; |
| @@ -1412,6 +1398,8 @@ sub process { | |||
| 1412 | my %suppress_export; | 1398 | my %suppress_export; |
| 1413 | my $suppress_statement = 0; | 1399 | my $suppress_statement = 0; |
| 1414 | 1400 | ||
| 1401 | my %camelcase = (); | ||
| 1402 | |||
| 1415 | # Pre-scan the patch sanitizing the lines. | 1403 | # Pre-scan the patch sanitizing the lines. |
| 1416 | # Pre-scan the patch looking for any __setup documentation. | 1404 | # Pre-scan the patch looking for any __setup documentation. |
| 1417 | # | 1405 | # |
| @@ -1757,6 +1745,13 @@ sub process { | |||
| 1757 | #print "is_start<$is_start> is_end<$is_end> length<$length>\n"; | 1745 | #print "is_start<$is_start> is_end<$is_end> length<$length>\n"; |
| 1758 | } | 1746 | } |
| 1759 | 1747 | ||
| 1748 | # discourage the addition of CONFIG_EXPERIMENTAL in Kconfig. | ||
| 1749 | if ($realfile =~ /Kconfig/ && | ||
| 1750 | $line =~ /.\s*depends on\s+.*\bEXPERIMENTAL\b/) { | ||
| 1751 | WARN("CONFIG_EXPERIMENTAL", | ||
| 1752 | "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n"); | ||
| < | |||
