Re: [PATCH 2/7] parport: Use more comon logging styles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.03.20 20:39, Joe Perches wrote:
> 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.

Ok.

> 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.

Ok, then keep it as you had.

Thanks!
Helge




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux