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

From: Andy Shevchenko
Date: Fri Dec 18 2015 - 07:32:21 EST


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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/