mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Joe Perches <joe@perches.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	Nick Desaulniers <nick.desaulniers@gmail.com>,
	rjw@rjwysocki.net, len.brown@intel.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: small formatting fixes
Date: Tue, 13 Dec 2016 11:00:22 +0100	[thread overview]
Message-ID: <87shpsi1xl.fsf@miraculix.mork.no> (raw)
In-Reply-To: <1481581932.29291.6.camel@perches.com> (Joe Perches's message of "Mon, 12 Dec 2016 14:32:12 -0800")

Joe Perches <joe@perches.com> writes:
> On Mon, 2016-12-12 at 23:22 +0100, Pavel Machek wrote:
>> On Mon 2016-12-12 10:39:15, Joe Perches wrote:
>> > On Mon, 2016-12-12 at 09:56 -0800, Nick Desaulniers wrote:
>> > > A quick cleanup that passes scripts/checkpatch.pl -f <file>.
> []
>> > > diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> []
>> > It's generally better not to convert
>> > these printk(KERN_DEBUG uses.
>> > 
>> > There are behavior differences between
>> > 	printk(KERN_DEBUG ...);
>> > and
>> > 	pr_debug(...);
>> > 
>> > The first will always be emitted as long
>> > as the console level is appropriate.
>> > 
>> > The second depends on a #define DEBUG
>> > before it gets emitted or a kernel 
>> > with CONFIG_DYNAMIC_DEBUG enabled and
>> > this entry specifically enabled in the
>> > control file.
>> 
>> Hmm. Perhaps pr_debug should be called pr_c_debug() or something? This
>> is rather nice trap.
>
> Yeah, I've suggested veriants like pr_always_debug (from 2009)
> http://lkml.iu.edu/hypermail/linux/kernel/0910.0/00399.html

The ability to strip the kernel from all debugging messages, or to keep
them and dynamically enabling the interesting ones, are both important
features *on top of* printk(KERN_DEBUG ...); If you add pr_c_debug() or
whatever, then you'll only create a use case for another level of "strip
this out".  Back to square one.

If this is a case of "my debug message is too important to let the user
strip it from the kernel", then just use pr_info().  If not, then live
with the additional debug level features leaving the control in the
hands of the user.

Personally, I want to be able to do dynamic debugging without having to
manually filter out any unconditional debug messages.  Please don't mess
that up.  There are more than enough levels for unconditional messages.
we can afford to reserve KERN_DEBUG for the dynamic debug conditional
ones.

Thanks.


Bjørn

  parent reply	other threads:[~2016-12-13 10:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  7:25 Nick Desaulniers
2016-12-12  8:56 ` Pavel Machek
2016-12-12 17:56   ` Nick Desaulniers
2016-12-12 18:39     ` Joe Perches
2016-12-12 22:22       ` Pavel Machek
2016-12-12 22:32         ` Joe Perches
2016-12-12 23:08           ` Pavel Machek
2016-12-12 23:13             ` Joe Perches
2016-12-13 10:00           ` Bjørn Mork [this message]
2016-12-12 23:20         ` Nick Desaulniers
2016-12-12 23:22           ` Joe Perches
2016-12-13 19:00             ` Pavel Machek
2016-12-23  3:19               ` Nick Desaulniers
2016-12-23 12:10                 ` Rafael J. Wysocki
2017-01-11 20:03                 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2016-11-21  6:51 Nick Desaulniers

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=87shpsi1xl.fsf@miraculix.mork.no \
    --to=bjorn@mork.no \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nick.desaulniers@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --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

all inboxes | Powered by JetHome®