
While there are good reasons to use 'if (IS_ENABLED(CONFIG_...))' for runtime tests, there's equally good reasons to use '#ifdef CONFIG_...' for build time tests. Reword this message to hopefully avoid confusion.
Cc: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fe13e265a3fe..2d737bdb991b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2621,7 +2621,7 @@ sub u_boot_line { # use if instead of #if if ($realfile =~ /.c$/ && $line =~ /^+#if.*CONFIG.*/) { WARN("PREFER_IF", - "Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible\n" . $herecurr); + "Possible runtime #ifdef, see if using 'if (IS_ENABLED(CONFIG...))' instead is possible\n" . $herecurr); }
# prefer strl(cpy|cat) over strn(cpy|cat)