[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180222162558.3f5cfcad@bbrezillon>
Date: Thu, 22 Feb 2018 16:25:58 +0100
From: Boris Brezillon <boris.brezillon@...tlin.com>
To: Shreeya Patel <shreeya.patel23498@...il.com>
Cc: Richard Weinberger <richard@....at>,
boris.brezillon@...e-electrons.com, dwmw2@...radead.org,
computersforpeace@...il.com, marek.vasut@...il.com,
cyrille.pitchen@...ev4u.fr, maximlevitsky@...il.com,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
ezequiel@...guardiasur.com.ar, outreachy-kernel@...glegroups.com
Subject: Re: [PATCH NAND v3] mtd: nand: Replace printk() with appropriate
pr_*() macro
On Thu, 22 Feb 2018 20:15:58 +0530
Shreeya Patel <shreeya.patel23498@...il.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
Powered by blists - more mailing lists