From: Joe Perches <joe@perches.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
apw@canonical.com, Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] checkpatch: check for missing \n at the end of logging message
Date: Thu, 09 Apr 2020 08:29:49 -0700 [thread overview]
Message-ID: <bcdfa5ae68b8cb7d9324a89aedf452f6209b570c.camel@perches.com> (raw)
In-Reply-To: <60c732a1-aa4e-afab-d223-894a67713003@wanadoo.fr>
On Thu, 2020-04-09 at 09:24 +0200, Christophe JAILLET wrote:
> I think that, at least printk(), WARN() and co, and panic() should also
> be handled the same way.
Maybe.
> A few files (5 according to my grep) also have something like:
> #define pr_fmt(fmt) "bcache: %s()" fmt "\n", __func__
> and then sometimes a mix of pr_xxx() with either trailing \n or not.
Didn't know about those.
> Maybe those should be handled manually to be consistent and avoid a "\n"
> in pr_fmt which is not widely used in other files
More likely the pr_fmt should have the \n removed and added
to the uses.
$ git grep -P 'define\s+pr_fmt.*\\n'
drivers/clocksource/timer-davinci.c:#define pr_fmt(fmt) "%s: " fmt "\n", __func__
drivers/md/bcache/bcache.h:#define pr_fmt(fmt) "bcache: %s() " fmt "\n", __func__
drivers/md/bcache/bset.c:#define pr_fmt(fmt) "bcache: %s() " fmt "\n", __func__
lib/math/prime_numbers.c:#define pr_fmt(fmt) "prime numbers: " fmt "\n"
lib/percpu-refcount.c:#define pr_fmt(fmt) "%s: " fmt "\n", __func__
lib/test_hash.c:#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt "\n"
tools/usb/usbip/libsrc/usbip_common.h:#define pr_fmt(fmt) "%s: %s: " fmt "\n", PROGNAME
next prev parent reply other threads:[~2020-04-09 15:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 20:49 [PATCH] checkpatch: check for missing \n at the end of logging message Christophe JAILLET
2020-04-08 0:33 ` Joe Perches
2020-04-08 20:19 ` Marion & Christophe JAILLET
2020-04-08 2:14 ` Joe Perches
2020-04-08 20:23 ` Marion & Christophe JAILLET
2020-04-09 3:10 ` Joe Perches
2020-04-09 7:24 ` Christophe JAILLET
2020-04-09 7:24 ` Christophe JAILLET
2020-04-09 15:29 ` Joe Perches [this message]
2020-04-09 17:34 ` Christophe JAILLET
2020-04-09 17:34 ` Christophe JAILLET
2020-04-09 17:50 ` Joe Perches
2020-04-09 18:52 ` Christophe JAILLET
2020-04-09 18:52 ` Christophe JAILLET
2020-04-09 21:40 ` Joe Perches
2020-04-09 10:40 ` Dan Carpenter
2020-04-10 17:35 ` Christophe JAILLET
2020-04-10 19:46 ` Joe Perches
2020-04-10 19:53 ` Joe Perches
2020-04-11 6:48 ` Christophe JAILLET
2020-04-11 6:48 ` Christophe JAILLET
2020-04-11 10:10 ` Andy? checkpatch $stat question (was: Re: [PATCH] checkpatch: check for missing \n at the end of logging message) Joe Perches
2020-04-11 7:12 ` [PATCH] checkpatch: check for missing \n at the end of logging message Christophe JAILLET
2020-04-11 7:12 ` Christophe JAILLET
2020-04-11 7:13 ` Marion & Christophe JAILLET
2020-04-11 10:17 ` Joe Perches
2020-04-11 10:27 ` Christophe JAILLET
2020-04-11 10:27 ` Christophe JAILLET
2020-04-10 19:34 ` Joe Perches
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=bcdfa5ae68b8cb7d9324a89aedf452f6209b570c.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@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