Re: [PATCH] char: Prefer pr_* instead of printk

From: Greg KH
Date: Sat Jun 04 2016 - 12:36:46 EST


On Sat, Jun 04, 2016 at 08:15:11PM +0530, Jyoti Singh wrote:
> This patch replaces all the printk[KERN_INFO] with pr_* in the file
> "ttyprintk.c" addressing the following warning:
>
> WARNING:Prefer [subsystem eg: netdev]_info([subsystem]dev, ...
> then dev_info(dev,... then pr_info(... to printk(KERN_INFO ...
> Found with checkpatch

Sometimes checkpatch tells you to do things that are incorrect :)

Are you _sure_ the code works the same before and after this? The
ttyprintk driver is a bit "special".

Did you test these changes?

thanks,

greg k-h