From: Borislav Petkov <bp@alien8.de>
To: Ingo Molnar <mingo@kernel.org>
Cc: Chen Yucong <slaoub@gmail.com>,
tglx@linutronix.de, hpa@zytor.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] x86/kernel: use pr_<level>() and dev_<level>
Date: Tue, 16 Feb 2016 10:01:38 +0100 [thread overview]
Message-ID: <20160216090138.GA3902@pd.tnic> (raw)
In-Reply-To: <20160216082431.GA3335@gmail.com>
On Tue, Feb 16, 2016 at 09:24:31AM +0100, Ingo Molnar wrote:
> Hm, so I suspect the other patch I already applied is buggy as well?
Yap.
pr_debug() is ugly to use:
/* If you are writing a driver, please use dev_dbg instead */
#if defined(CONFIG_DYNAMIC_DEBUG)
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
#define pr_debug(fmt, ...) \
dynamic_pr_debug(fmt, ##__VA_ARGS__)
#elif defined(DEBUG)
#define pr_debug(fmt, ...) \
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
#define pr_debug(fmt, ...) \
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif
so in the !CONFIG_DYNAMIC_DEBUG case, you want to boot with "ignore_loglevel"
and see all those debug statements but that can't work because you have to
rebuild and slap a
#define DEBUG
somewhere *before* all includes.
Which is clearly dumb.
FWIW, that pr_debug() should have been defined without the
defined(DEBUG) conditional in order to be an equivalent conversion like
the rest of the pr_* gunk.
I propose we add
pr_debug_i_mean_it()
and use *that* instead. :-)
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
prev parent reply other threads:[~2016-02-16 9:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-14 4:10 [PATCH v2] x86/kernel: use pr_<level>() and dev_<level> Chen Yucong
2016-02-14 4:22 ` kbuild test robot
2016-02-14 5:07 ` kbuild test robot
2016-02-14 14:08 ` Borislav Petkov
2016-02-16 8:24 ` Ingo Molnar
2016-02-16 9:01 ` Borislav Petkov [this message]
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=20160216090138.GA3902@pd.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=slaoub@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@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 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).