]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2022 19:03:07 +0000 (20:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2022 19:03:07 +0000 (20:03 +0100)
added patches:
kconfig-display-recursive-dependency-resolution-hint-just-once.patch

queue-4.9/kconfig-display-recursive-dependency-resolution-hint-just-once.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/kconfig-display-recursive-dependency-resolution-hint-just-once.patch b/queue-4.9/kconfig-display-recursive-dependency-resolution-hint-just-once.patch
new file mode 100644 (file)
index 0000000..7389449
--- /dev/null
@@ -0,0 +1,64 @@
+From e3b03bf29d6b99fab7001fb20c33fe54928c157a Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Sat, 16 Dec 2017 00:28:42 +0900
+Subject: kconfig: display recursive dependency resolution hint just once
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+commit e3b03bf29d6b99fab7001fb20c33fe54928c157a upstream.
+
+Commit 1c199f2878f6 ("kbuild: document recursive dependency limitation
+/ resolution") probably intended to show a hint along with "recursive
+dependency detected!" error, but it missed to add {...} guard, and the
+hint is displayed in every loop of the dep_stack traverse, annoyingly.
+
+This error was detected by GCC's -Wmisleading-indentation when switching
+to build-time generation of lexer/parser.
+
+scripts/kconfig/symbol.c: In function ‘sym_check_print_recursive’:
+scripts/kconfig/symbol.c:1150:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
+   if (stack->sym == last_sym)
+   ^~
+scripts/kconfig/symbol.c:1153:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
+    fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
+    ^~~~~~~
+
+I could simply add {...} to surround the three fprintf(), but I rather
+chose to move the hint after the loop to make the whole message readable.
+
+Fixes: 1c199f2878f6 ("kbuild: document recursive dependency limitation / resolution"
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
+Cc: Daniel Díaz <daniel.diaz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/kconfig/symbol.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/scripts/kconfig/symbol.c
++++ b/scripts/kconfig/symbol.c
+@@ -1130,8 +1130,7 @@ static void sym_check_print_recursive(st
+               if (stack->sym == last_sym)
+                       fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
+                               prop->file->name, prop->lineno);
+-                      fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
+-                      fprintf(stderr, "subsection \"Kconfig recursive dependency limitations\"\n");
++
+               if (stack->expr) {
+                       fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
+                               prop->file->name, prop->lineno,
+@@ -1161,6 +1160,11 @@ static void sym_check_print_recursive(st
+               }
+       }
++      fprintf(stderr,
++              "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n"
++              "subsection \"Kconfig recursive dependency limitations\"\n"
++              "\n");
++
+       if (check_top == &cv_stack)
+               dep_stack_remove();
+ }
index 0904e203862aeea6a9c2a439c7953db9e0cc8190..3027f5da155e310ef608cbcf677b87e0de2dcd1b 100644 (file)
@@ -20,4 +20,5 @@ s390-crashdump-fix-tod-programmable-field-size.patch
 kbuild-fix-wimplicit-function-declaration-in-license_is_gpl_compatible.patch
 iio-light-apds9960-fix-wrong-register-for-gesture-gain.patch
 iio-core-fix-entry-not-deleted-when-iio_register_sw_trigger_type-fails.patch
+kconfig-display-recursive-dependency-resolution-hint-just-once.patch
 nios2-add-force-for-vmlinuz.gz.patch