[PATCH v2 1/3] mtd: mtdoops: change printk() to counterpart pr_ functions

Joe Perches joe at perches.com
Fri Oct 7 08:43:39 PDT 2022


On Fri, 2022-10-07 at 09:52 +0200, Miquel Raynal wrote:
> Hi Joe, Ray,
> 
> joe at perches.com wrote on Fri, 07 Oct 2022 00:09:26 -0700:
> 
> > On Fri, 2022-10-07 at 06:50 +0000, Ray Zhang wrote:
> > > To comply with latest kernel code requirement, change printk() to
> > > counterpart pr_ functions in mtdoops driver:
> > > - change printk(INFO) to pr_info()
> > > - change printk(DEBUG) to pr_debug()  
> > 
> > There is a different behavior with printk(KERN_DEBUG to pr_debug(
> > as pr_debug is a no-op unless dynamic debugging is enabled or
> > DEBUG is defined.
> 
> I didn't know about this difference. I was expecting printk(KERN_DEBUG)
> to behave the same as pr_debug/dev_dbg.

No worries.  Most people do not know this trivia.

I just wanted to inform in case it matters here.
Likely it does not matter.

> But honestly in this driver I feel fine changing the printk(KERN_DEBUG)
> into pr_debug().

Your choice...



More information about the linux-mtd mailing list