Re: [PATCH v2 10/11] tty: serial: 8250: Replace printk by pr_*

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

 



On Fri, 2015-12-18 at 12:22 +0100, Anton Wuerfel wrote:


>  This comes with a slight change in behaviour as
> pr_debug is configurable via CONFIG_DYNAMIC_DEBUG, whereas
> printk(KERN_DEBUG ...) is not.

--- a/drivers/tty/serial/8250/8250_pnp.c
> +++ b/drivers/tty/serial/8250/8250_pnp.c
> @@ -465,9 +465,9 @@ serial_pnp_probe(struct pnp_dev *dev, const
> struct pnp_device_id *dev_id)
>  		return -ENODEV;
>  
>  #ifdef SERIAL_DEBUG_PNP
> -	printk(KERN_DEBUG

I think it's not okay.

The rationale to have printk(KERN_DEBUG …) here is to allow a
compilation with support of those messages independently on
DYNAMIC_DEBUG.

If you want to switch to DYNAMIC_DEBUG you have to carefully check what
is done under SERIAL_DEBUG_PNP.

git grep on current linux-next shows that SERIAL_DEBUG_PNP is an
orphan.

So, I would suggest to remove #ifdef.

> -		"Setup PNP port: port %x, mem 0x%lx, irq %d, type
> %d\n",
> -		       uart.port.iobase, uart.port.mapbase,
> uart.port.irq, uart.port.iotype);
> +	pr_debug("Setup PNP port: port %x, mem 0x%lx, irq %d, type
> %d\n",
> +		 uart.port.iobase, uart.port.mapbase,
> +		 uart.port.irq, uart.port.iotype);
>  #endif
> 


-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux