[PATCH NAND 0/5] Replace printk statements with pr_*macros

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Fri Feb 16 09:25:51 PST 2018


(Ccing MTD)

On 16 February 2018 at 14:24, Ezequiel Garcia
<ezequiel at vanguardiasur.com.ar> wrote:
> Hey Richard,
>
> On 16 February 2018 at 14:19, Richard Weinberger <richard at nod.at> wrote:
>> Am Freitag, 16. Februar 2018, 17:50:09 CET schrieb Shreeya Patel:
>>> This patchset removes all the log levels i.e. KERN_WARN,
>>> KERN_NOTICE, KERN_ERR, KERN_INFO, KERN_DEBUG used in the printk
>>> statements and replaces the printk statements with appropriate
>>> pr_*macros.
>>> According to the kernel coding style, pr_*macro is the preferred
>>> way to print the message.
>>
>> Beside of that, how does it improve the code?
>> Don't get me wrong, pr_* is the way to go for new code, but I don't think it
>> is worth "fixing" in existing code and make working with git blame more
>> painful.
>>
>
> Shreeya's intention is to work on [1], migrating drivers to exec_op.
> As a first task, before being accepted, she is required to submit
> cleanup patches (or small tasks).
>
> Since I couldn't come up with small tasks for MTD, I suggested
> starting with printk cleaning. So this was my idea.
>
> Printk to pr_{} or dev_{} is not only aesthetical, it's also a consolidation
> change. Centralizing prints allows for other improvements.
>
> See for instance Wolfram's work [2, 3].
>
> In any case, does it hurt git-blame so much? It only affects
> the lines where the print is performed.
>
> BTW, should you have ideas for small cleanup tasks in MTD,
> let us know.
>
> [1] https://www.outreachy.org/communities/cfp/linux-kernel/project/migrate-nand-driver-to-new-exec_op-framework/
> [2] https://elinux.org/Refactor_kernel_strings
> [3] https://elinux.org/Refactor_kernel_strings
>
> Thanks,
> --
> Ezequiel García, VanguardiaSur
> www.vanguardiasur.com.ar



-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar



More information about the linux-mtd mailing list