History

Merge tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada: - improve checkpatch for more precise Kconfig code checking - clarify effective selects by grouping reverse dependencies in help - do not write out '# CONFIG_FOO is not set' from invisible symbols - make oldconfig as silent as it should be - rename 'silentoldconfig' to 'syncconfig' - add unit-test framework and several test cases - warn unmet dependency of tristate symbols - make unmet dependency warnings readable, removing false positives - improve recursive include detection - use yylineno to simplify the line number tracking - misc cleanups * tag 'kconfig-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits) kconfig: use yylineno option instead of manual lineno increments kconfig: detect recursive inclusion earlier kconfig: remove duplicated file name and lineno of recursive inclusion kconfig: do not include both curses.h and ncurses.h for nconfig kconfig: make unmet dependency warnings readable kconfig: warn unmet direct dependency of tristate symbols selected by y kconfig: tests: test if recursive inclusion is detected kconfig: tests: test if recursive dependencies are detected kconfig: tests: test randconfig for choice in choice kconfig: tests: test defconfig when two choices interact kconfig: tests: check visibility of tristate choice values in y choice kconfig: tests: check unneeded "is not set" with unmet dependency kconfig: tests: test if new symbols in choice are asked kconfig: tests: test automatic submenu creation kconfig: tests: add basic choice tests kconfig: tests: add framework for Kconfig unit testing kbuild: add PYTHON2 and PYTHON3 variables kconfig: remove redundant streamline_config.pl prerequisite kconfig: rename silentoldconfig to syncconfig kconfig: invoke oldconfig instead of silentoldconfig from local*config ...

Linus Torvalds committed 8 years ago

Commit 147a89b2 parents 3b24b83 184926858 files · +1043 −139Browse files

Showing the changes to scripts/checkpatch.pl (1 of 58 files). Show all

Unified · Split

scripts/checkpatch.pl+17−4
@@ -2797,7 +2797,10 @@ sub process { · 2796 unmodified lines
2797# Only applies when adding the entry originally, after that we do not have2797# Only applies when adding the entry originally, after that we do not have
2798# sufficient context to determine whether it is indeed long enough.2798# sufficient context to determine whether it is indeed long enough.
2799 if ($realfile =~ /Kconfig/ &&2799 if ($realfile =~ /Kconfig/ &&
2800 $line =~ /^\+\s*config\s+/) {2800 # 'choice' is usually the last thing on the line (though
2801 # Kconfig supports named choices), so use a word boundary
2802 # (\b) rather than a whitespace character (\s)
2803 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
2801 my $length = 0;2804 my $length = 0;
2802 my $cnt = $realcnt;2805 my $cnt = $realcnt;
2803 my $ln = $linenr + 1;2806 my $ln = $linenr + 1;
@@ -2812,9 +2815,13 @@ sub process { · 8 unmodified lines
2812 next if ($f =~ /^-/);2815 next if ($f =~ /^-/);
2813 last if (!$file && $f =~ /^\@\@/);2816 last if (!$file && $f =~ /^\@\@/);
2814 2817
2815 if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate)\s*\"/) {2818 if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
2816 $is_start = 1;2819 $is_start = 1;
2817 } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) {2820 } elsif ($lines[$ln - 1] =~ /^\+\s*(?:help|---help---)\s*$/) {
2821 if ($lines[$ln - 1] =~ "---help---") {
2822 WARN("CONFIG_DESCRIPTION",
2823 "prefer 'help' over '---help---' for new help texts\n" . $herecurr);
2824 }
2818 $length = -1;2825 $length = -1;
2819 }2826 }
2820 2827
@@ -2822,7 +2829,13 @@ sub process { · 1 unmodified line
2822 $f =~ s/#.*//;2829 $f =~ s/#.*//;
2823 $f =~ s/^\s+//;2830 $f =~ s/^\s+//;
2824 next if ($f =~ /^$/);2831 next if ($f =~ /^$/);
2825 if ($f =~ /^\s*config\s/) {2832
2833 # This only checks context lines in the patch
2834 # and so hopefully shouldn't trigger false
2835 # positives, even though some of these are
2836 # common words in help texts
2837 if ($f =~ /^\s*(?:config|menuconfig|choice|endchoice|
2838 if|endif|menu|endmenu|source)\b/x) {
2826 $is_end = 1;2839 $is_end = 1;
2827 last;2840 last;
2828 }2841 }