public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: drbd-dev@lists.linbit.com, Joe Perches <joe@perches.com>
Cc: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Subject: Re: [Drbd-dev] [PATCH 15/20] drbd: cosmetic: change all printk(level, ...) to pr_<level>(...)
Date: Wed, 02 Jul 2014 11:58:57 +0200	[thread overview]
Message-ID: <1635548.f802ec2nnc@fat-tyre> (raw)
In-Reply-To: <1404232237.14624.2.camel@joe-AO725>

Am Dienstag, 1. Juli 2014, 09:30:37 schrieb Joe Perches:
> On Tue, 2014-07-01 at 18:16 +0200, Philipp Reisner wrote:
> > From: Lars Ellenberg <lars.ellenberg@linbit.com>
> > 
> > Cosmetic change only.
> 
> []
> 
> > diff --git a/drivers/block/drbd/drbd_bitmap.c
> > b/drivers/block/drbd/drbd_bitmap.c
> []
> 
> > @@ -353,9 +353,8 @@ static void bm_free_pages(struct page **pages,
> > unsigned long number)> 
> >  	for (i = 0; i < number; i++) {
> >  	
> >  		if (!pages[i]) {
> > 
> > -			printk(KERN_ALERT "drbd: bm_free_pages tried to free "
> > -					  "a NULL pointer; i=%lu n=%lu\n",
> > -					  i, number);
> > +			pr_alert("bm_free_pages tried to free a NULL pointer; i=%lu n=%lu\n",
> > +				 i, number);
> 
> Cosmetic yes, but these won't be prefixed with "drbd: "
> unless there's a #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> somewhere above this and before any other #include.
> 

Right. Thanks for pointing that out!
I ammend it with this:

Subject: [PATCH] fixup! drbd: cosmetic: change all printk(level, ...) to
 pr_<level>(...)

---
 drivers/block/drbd/drbd_bitmap.c | 2 ++
 drivers/block/drbd/drbd_main.c   | 2 +-
 drivers/block/drbd/drbd_nl.c     | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 72370e2..f435e7e 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -22,6 +22,8 @@
    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define pr_fmt(fmt)    KBUILD_MODNAME ": " fmt
+
 #include <linux/bitops.h>
 #include <linux/vmalloc.h>
 #include <linux/string.h>
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 3788ac1..9b465bb 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -26,7 +26,7 @@
 
  */
 
-#define pr_fmt(fmt)    "drbd: " fmt
+#define pr_fmt(fmt)    KBUILD_MODNAME ": " fmt
 
 #include <linux/module.h>
 #include <linux/jiffies.h>
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index bb9b8e5..7fcdc54 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -23,7 +23,7 @@
 
  */
 
-#define pr_fmt(fmt)    "drbd: " fmt
+#define pr_fmt(fmt)    KBUILD_MODNAME ": " fmt
 
 #include <linux/module.h>
 #include <linux/drbd.h>
-- 
1.9.1


  reply	other threads:[~2014-07-02  9:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 16:16 [PATCH 00/20] RFC DRBD fixes Philipp Reisner
2014-07-01 16:16 ` [PATCH 01/20] drbd: drop wrong debugging aid Philipp Reisner
2014-07-01 16:16 ` [PATCH 02/20] drbd: silence -Wmissing-prototypes warnings Philipp Reisner
2014-07-01 16:16 ` [PATCH 03/20] drbd: Remove unnecessary/unused code Philipp Reisner
2014-07-01 16:16 ` [PATCH 04/20] drbd: fix bogus resync stats in /proc/drbd Philipp Reisner
2014-07-01 16:16 ` [PATCH 05/20] drbd: don't implicitly resize Diskless node beyond end of device Philipp Reisner
2014-07-01 16:16 ` [PATCH 06/20] drbd: implement csums-after-crash-only Philipp Reisner
2014-07-01 16:16 ` [PATCH 07/20] drbd: Limit the time we are waiting for the first packet on an accepted socket Philipp Reisner
2014-07-01 16:16 ` [PATCH 08/20] drbd: New net configuration option socket-check-timeout Philipp Reisner
2014-07-01 16:16 ` [PATCH 09/20] drbd: application writes may set-in-sync in protocol != C Philipp Reisner
2014-07-01 16:16 ` [PATCH 10/20] drbd: short-circuit in maybe_pull_ahead Philipp Reisner
2014-07-01 16:16 ` [PATCH 11/20] drivers/block: Use RCU_INIT_POINTER(x, NULL) in drbd/drbd_state.c Philipp Reisner
2014-07-01 16:16 ` [PATCH 12/20] block: Convert last uses of __FUNCTION__ to __func__ Philipp Reisner
2014-07-01 16:16 ` [PATCH 13/20] drbd: improve resync request throttling due to sendbuf size Philipp Reisner
2014-07-01 16:16 ` [PATCH 14/20] drbd: clear CRASHED_PRIMARY only after successful resync Philipp Reisner
2014-07-01 16:16 ` [PATCH 15/20] drbd: cosmetic: change all printk(level, ...) to pr_<level>(...) Philipp Reisner
2014-07-01 16:30   ` Joe Perches
2014-07-02  9:58     ` Philipp Reisner [this message]
2014-07-01 16:16 ` [PATCH 16/20] drbd: drbd_rs_number_requests: fix unit mismatch in comparison Philipp Reisner
2014-07-01 16:16 ` [PATCH 17/20] drbd: add drbd_queue_work_if_unqueued helper Philipp Reisner
2014-07-01 16:16 ` [PATCH 18/20] drbd: drop drbd_md_flush Philipp Reisner
2014-07-01 16:16 ` [PATCH 19/20] drbd: consistently use list_add_tail for peer_request tracking Philipp Reisner
2014-07-01 16:16 ` [PATCH 20/20] drbd: also keep track of trim -> zero-out fallback peer_requests Philipp Reisner

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=1635548.f802ec2nnc@fat-tyre \
    --to=philipp.reisner@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=drbd-dev@lists.linbit.com \
    --cc=joe@perches.com \
    --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