From: raphaelcampos.rp@gmail.com (Raphael Silva)
To: kernelnewbies@lists.kernelnewbies.org
Subject: printk or pr_<level>?
Date: Wed, 23 Jul 2014 15:16:52 -0300 [thread overview]
Message-ID: <53CFFC14.1040803@gmail.com> (raw)
Hello guys,
1)
If I use printk(KERN_<LEVEL>...) the checkpatch warns me:
WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
So, pr_devel() is the correct way to print a debug level msg?
2)
if pr_<level> is the correct way, what about KERN_DEFAULT ?
If I don't put the kern_level (printk("Hello");)
WARNING: printk() should include KERN_ facility level
if I put KERN_DEFAULT:
WARNING: Prefer [subsystem eg: netdev]_default([subsystem]dev, ... then
dev_default(dev, ... then pr_default(... to printk(KERN_DEFAULT ...
But for KERN_DEFAULT, there isn't a macro pr_<level> like pr_devel().
Can anyone show me the correct way?
tks
next reply other threads:[~2014-07-23 18:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 18:16 Raphael Silva [this message]
2014-07-23 18:34 ` printk or pr_<level>? Kristofer Hallin
2014-07-23 18:39 ` Fernando Apesteguía
2014-07-23 18:40 ` Kristofer Hallin
2014-07-23 18:56 ` Greg KH
2014-07-23 21:45 ` Arlie Stephens
2014-07-23 23:00 ` Greg KH
2014-07-23 23:00 ` Greg KH
2014-07-24 0:02 ` Raphael Silva
2014-07-24 18:36 ` Arlie Stephens
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=53CFFC14.1040803@gmail.com \
--to=raphaelcampos.rp@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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).