linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kconfig: diagnostics cleanups
@ 2020-11-25 14:38 Boris Kolpackov
  2020-12-01 14:19 ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Boris Kolpackov @ 2020-11-25 14:38 UTC (permalink / raw)
  To: Linux Kbuild mailing list; +Cc: Masahiro Yamada, Luis Chamberlain

I am preparing a set of patches that clean up kconfig diagnostics and
make it more consistent both internally and with respect to other
tools (like compilers). However, a couple of changes that I would like
to make could be controversial so I want to discuss them before wasting
everyone's time with patches:

1. Add 'warning' word to $(warning-if) output:

-  fprintf(stderr, "%s:%d: %s\n", ...);
+  fprintf(stderr, "%s:%d: warning: %s\n", ...);

   This makes it consistent with the rest of the warnings printed by
   kconfig.

2. Print $(info) output to stderr instead of stdout.

I realize the current behavior is consistent with GNU make (on which
it is based) but at the same time it's inconsistent with the rest of
kconfig (#1) or does not seem to make much sense (#2), at least to
me.

To elaborate on #2, $(info) is still diagnostics, just a different
level compared to $(warning-if) and $(error-if). It's not clear to
me why it should go to stdout.

If we needed the ability to print something to stdout, we could add
another function, such as $(print). However, I can't think of a good
reason why we would need to; this, for example, has the potential to
mess up with the terminal-based UI (which is written to stdout).

I've done a search and as far as I can see, neither $(warning) nor
$(info) is currently used anywhere in the kernel outside the kconfig
testsuite. So these changes shouldn't have any backwards-compatibility
issues.

Thoughts?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-22 13:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-25 14:38 kconfig: diagnostics cleanups Boris Kolpackov
2020-12-01 14:19 ` Masahiro Yamada
2020-12-02  8:06   ` Boris Kolpackov
2020-12-21 10:32     ` Masahiro Yamada
2020-12-21 14:05       ` Boris Kolpackov
2020-12-22  5:49         ` Masahiro Yamada
2020-12-22 13:03           ` Boris Kolpackov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).