lkml.org 
[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/7] parport: Use more comon logging styles
From
Date
On Mon, 2020-03-02 at 20:29 +0100, Helge Deller wrote:
> On 28.02.20 09:32, Joe Perches wrote:
> > Some of the logging can be poorly formatted because of unexpected
> > line breaks given printks without KERN_CONT that should be pr_cont.
[]
> > diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c
[]
> > @@ -238,14 +238,14 @@ struct parport *parport_gsc_probe_port(unsigned long base,
> >
> > priv = kzalloc (sizeof (struct parport_gsc_private), GFP_KERNEL);
> > if (!priv) {
> > - printk (KERN_DEBUG "parport (0x%lx): no memory!\n", base);
> > + printk(KERN_DEBUG "parport (0x%lx): no memory!\n", base);
>
> pr_warn() instead?

For all of your remarks, the intent here is to keep the
same output.

Logging level changes and printk(KERN_DEBUG -> pr_debug(
conversions cause the dmesg output to be different.

printk(KERN_DEBUG...)

is always emitted when the console level allows but

pr_debug(...)

is not normally compiled in at all.

So it's possible for all printk(KERN_DEBUG to be pr_debug
but that causes no logging at all to be emitted when
DEBUG is not defined or CONFIG_DYNAMIC_DEBUG not enabled.


\
 
 \ /
  Last update: 2020-03-02 20:42    [W:0.206 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site