kconfig: display recursive dependency resolution hint just once
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 15 Dec 2017 15:28:42 +0000 (00:28 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 20:46:19 +0000 (21:46 +0100)
commit8208d00a70bdf17ba50edea6cf1a79a3fd93744a
treec7e0161f23b8c9ddbc6c8e562b54cea072fc342f
parenta542100e78834c07080b393b00484fc2be46212f
kconfig: display recursive dependency resolution hint just once

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.

config/symbol.c: In function ‘sym_check_print_recursive’:
config/symbol.c:1150:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (stack->sym == last_sym)
   ^~
config/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>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/symbol.c