From: Boris Kolpackov <boris@codesynthesis.com>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>
Subject: kconfig: diagnostics cleanups
Date: Wed, 25 Nov 2020 16:38:14 +0200 [thread overview]
Message-ID: <boris.20201125161355@codesynthesis.com> (raw)
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?
next reply other threads:[~2020-11-25 14:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 14:38 Boris Kolpackov [this message]
2020-12-01 14:19 ` kconfig: diagnostics cleanups 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=boris.20201125161355@codesynthesis.com \
--to=boris@codesynthesis.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.