Re: [PATCH] mtd: chips: Replace printk() with pr_*() and define pr_fmt()

From: Joe Perches
Date: Mon Mar 12 2018 - 13:25:49 EST


On Mon, 2018-03-12 at 22:32 +0530, Arushi Singhal wrote:
> Using pr_<loglevel>() is more concise than printk(KERN_<LOGLEVEL>).
> This patch:
> * Replace printks having a log level with the appropriate pr_*() macros.
> * Define pr_fmt() to include relevant name.
> * Remove redundant prefixes from pr_*() calls.
> * Indent the code where possible.

Hello Arushi.

When you do these, please remember to remove the unnecessary
and inconsistent uses of periods and to coalesce formats
where appropriate.

Also, there was _some_ logic here behind the use of the
"cfi_cmdset_0001:" prefix on only some of the error messages.

Perhaps the commit message should describe that change a bit
more fully.

Lastly, please run checkpatch on your proposed patches.

$ ./scripts/checkpatch.pl --terse patch.mbox
patch.mbox:151: ERROR: space prohibited before that close parenthesis ')'
patch.mbox:160: ERROR: space prohibited before that close parenthesis ')'
patch.mbox:183: WARNING: line over 80 characters
patch.mbox:201: WARNING: line over 80 characters
patch.mbox:211: ERROR: space required after that ',' (ctx:VxV)
patch.mbox:253: WARNING: quoted string split across lines
patch.mbox:273: WARNING: line over 80 characters
patch.mbox:273: WARNING: Prefer using '"%s...", __func__' to using 'put_chip', this function's name, in a string
patch.mbox:282: WARNING: line over 80 characters
patch.mbox:304: WARNING: line over 80 characters
patch.mbox:313: WARNING: line over 80 characters
patch.mbox:346: WARNING: line over 80 characters
patch.mbox:364: WARNING: line over 80 characters
patch.mbox:376: WARNING: line over 80 characters
patch.mbox:383: WARNING: line over 80 characters
patch.mbox:456: WARNING: line over 80 characters
patch.mbox:465: WARNING: line over 80 characters
total: 3 errors, 14 warnings, 343 lines checked