All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Shreeya Patel <shreeya.patel23498@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	boris.brezillon@free-electrons.com, dwmw2@infradead.org,
	computersforpeace@gmail.com, marek.vasut@gmail.com,
	cyrille.pitchen@wedev4u.fr, maximlevitsky@gmail.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	ezequiel@vanguardiasur.com.ar, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH NAND v3] mtd: nand: Replace printk() with appropriate pr_*() macro
Date: Thu, 22 Feb 2018 16:25:58 +0100	[thread overview]
Message-ID: <20180222162558.3f5cfcad@bbrezillon> (raw)
In-Reply-To: <1519310758.2359.3.camel@gmail.com>

On Thu, 22 Feb 2018 20:15:58 +0530
Shreeya Patel <shreeya.patel23498@gmail.com> wrote:

> On Thu, 2018-02-22 at 15:30 +0100, Richard Weinberger wrote:
> > Am Donnerstag, 22. Februar 2018, 14:10:14 CET schrieb Shreeya Patel:  
> > > 
> > > @@ -438,7 +438,7 @@ static void __init doc2000_count_chips(struct
> > > mtd_info
> > > *mtd) break;
> > >  	}
> > >  	doc->chips_per_floor = i;
> > > -	printk(KERN_DEBUG "Detected %d chips per floor.\n", i);
> > > +	pr_debug("Detected %d chips per floor.\n", i);  
> > <bike-shedding>
> > 
> > You are aware of the fact that printk(KERN_DEBUG and pr_debug() are
> > not 
> > equivalent?
> > Not a big deal, just want to make sure that you understand what you
> > are doing.   
> 
> Actually pr_debug() shouldn't be used here.
> 
> We usually don't prefer pr_debug for drivers, instead we use dev_dbg.
> But as Boris told me that it will be better to first having changed all
> printks to pr_*() macro and then think about dev_*() macros.

BTW, I see a bunch of remaining printks when I do 'git grep printk
drivers/mtd/nand', basically all those that don't have a
KERN_<LOGLEVEL> in it. I know your commit log explicitly says that only
printks embedding a log level are converted to pr_xxx(), but it's
probably worth patching those printks as well (choosing the appropriate
log level between info, err and warn and use pr_xxx() helpers).
This should be done in a separate patch of course.

> 
> > :-)
> > 
> > </bike-shedding>
> > 
> > Thanks,
> > //richard  



-- 
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Shreeya Patel <shreeya.patel23498@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	boris.brezillon@free-electrons.com, dwmw2@infradead.org,
	computersforpeace@gmail.com, marek.vasut@gmail.com,
	cyrille.pitchen@wedev4u.fr, maximlevitsky@gmail.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	ezequiel@vanguardiasur.com.ar, outreachy-kernel@googlegroups.com
Subject: [Outreachy kernel] Re: [PATCH NAND v3] mtd: nand: Replace printk() with appropriate pr_*() macro
Date: Thu, 22 Feb 2018 16:25:58 +0100	[thread overview]
Message-ID: <20180222162558.3f5cfcad@bbrezillon> (raw)
In-Reply-To: <1519310758.2359.3.camel@gmail.com>

On Thu, 22 Feb 2018 20:15:58 +0530
Shreeya Patel <shreeya.patel23498@gmail.com> wrote:

> On Thu, 2018-02-22 at 15:30 +0100, Richard Weinberger wrote:
> > Am Donnerstag, 22. Februar 2018, 14:10:14 CET schrieb Shreeya Patel:  
> > > 
> > > @@ -438,7 +438,7 @@ static void __init doc2000_count_chips(struct
> > > mtd_info
> > > *mtd) break;
> > >  	}
> > >  	doc->chips_per_floor = i;
> > > -	printk(KERN_DEBUG "Detected %d chips per floor.\n", i);
> > > +	pr_debug("Detected %d chips per floor.\n", i);  
> > <bike-shedding>
> > 
> > You are aware of the fact that printk(KERN_DEBUG and pr_debug() are
> > not 
> > equivalent?
> > Not a big deal, just want to make sure that you understand what you
> > are doing.   
> 
> Actually pr_debug() shouldn't be used here.
> 
> We usually don't prefer pr_debug for drivers, instead we use dev_dbg.
> But as Boris told me that it will be better to first having changed all
> printks to pr_*() macro and then think about dev_*() macros.

BTW, I see a bunch of remaining printks when I do 'git grep printk
drivers/mtd/nand', basically all those that don't have a
KERN_<LOGLEVEL> in it. I know your commit log explicitly says that only
printks embedding a log level are converted to pr_xxx(), but it's
probably worth patching those printks as well (choosing the appropriate
log level between info, err and warn and use pr_xxx() helpers).
This should be done in a separate patch of course.

> 
> > :-)
> > 
> > </bike-shedding>
> > 
> > Thanks,
> > //richard  



-- 
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
To post to this group, send email to outreachy-kernel@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180222162558.3f5cfcad%40bbrezillon.
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2018-02-22 15:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 13:10 [PATCH NAND v3] mtd: nand: Replace printk() with appropriate pr_*() macro Shreeya Patel
2018-02-22 13:10 ` [Outreachy kernel] " Shreeya Patel
2018-02-22 13:13 ` Shreeya Patel
2018-02-22 13:13   ` [Outreachy kernel] " Shreeya Patel
2018-02-22 14:30 ` Richard Weinberger
2018-02-22 14:30   ` [Outreachy kernel] " Richard Weinberger
2018-02-22 14:45   ` Shreeya Patel
2018-02-22 14:45     ` [Outreachy kernel] " Shreeya Patel
2018-02-22 14:51     ` Boris Brezillon
2018-02-22 14:51       ` [Outreachy kernel] " Boris Brezillon
2018-02-22 15:25     ` Boris Brezillon [this message]
2018-02-22 15:25       ` Boris Brezillon
2018-02-22 14:45 ` Boris Brezillon
2018-02-22 14:45   ` [Outreachy kernel] " Boris Brezillon
2018-02-22 14:57 ` Boris Brezillon
2018-02-22 14:57   ` [Outreachy kernel] " Boris Brezillon

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=20180222162558.3f5cfcad@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=maximlevitsky@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=richard@nod.at \
    --cc=shreeya.patel23498@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.