From: Joe Perches <joe@perches.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it
Date: Thu, 15 Apr 2021 16:52:27 -0700 [thread overview]
Message-ID: <82fc2a9a0df1fa6c901645693cca2eab34d5f032.camel@perches.com> (raw)
In-Reply-To: <5bc599f199df4e43c4a7f02f167af3e897f823dd.1618520227.git.christophe.jaillet@wanadoo.fr>
On Thu, 2021-04-15 at 22:58 +0200, Christophe JAILLET wrote:
> 'printk(KERN_DEBUG pr_fmt(...))' can be replaced by a much less verbose
> 'pr_debug()'.
This is not really true because
printk(KERN_DEBUG ...);
will _always_ be emitted if the console level allows
pr_debug(...);
will _only_ be emitted if the console level allows _and_
DEBUG is defined or dynamic_debug is enabled
(and for dynamic_debug, only if specifically enabled)
DEBUG is defined and dynamic_debug is enabled
> diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
[]
> @@ -21,8 +21,8 @@ MODULE_LICENSE("GPL");
>
>
> static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
> {
> - printk(KERN_DEBUG pr_fmt("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n"),
> - dev_name(&handle->dev->dev), type, code, value);
> + pr_debug("Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
> + dev_name(&handle->dev->dev), type, code, value);
> }
next prev parent reply other threads:[~2021-04-15 23:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 20:58 [PATCH 1/2] Input: evbug - Remove an empty comment block Christophe JAILLET
2021-04-15 20:58 ` [PATCH 2/2] Input: evbug - Use 'pr_debug()' instead of hand-writing it Christophe JAILLET
2021-04-15 23:52 ` Joe Perches [this message]
2021-04-25 5:26 ` [PATCH 1/2] Input: evbug - Remove an empty comment block Dmitry Torokhov
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=82fc2a9a0df1fa6c901645693cca2eab34d5f032.camel@perches.com \
--to=joe@perches.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.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®