Re: [PATCH] serial: MMIO32 support for 8250_early.c

From: Andrew Morton
Date: Mon Jun 28 2010 - 16:44:37 EST


On Wed, 23 Jun 2010 23:10:20 +0400
Samium Gromoff <_deepfire@xxxxxxxxxxxxxxxxx> wrote:

> This should be fairly uncontroversial, but YMMV.
>
> Available from master branch at git://git.feelingofgreen.ru/linux
>
> commit 67e21ada6739e0730fb28f855abf4202a1bb3f8c
> Author: Samium Gromoff <deepfire@xxxxxxxxxx>
> Date: Thu Jun 24 00:36:16 2010 +0400
>
> Provide MMIO32 support in 8250_early (aka earlycon)

Please update Documentation/kernel-parameters.txt.

> ...
>
> @@ -182,9 +199,9 @@ static int __init parse_options(struct early_serial8250_device *device,
> }
>
> printk(KERN_INFO "Early serial console at %s 0x%llx (options '%s')\n",
> - mmio ? "MMIO" : "I/O port",
> - mmio ? (unsigned long long) port->mapbase
> - : (unsigned long long) port->iobase,
> + mmio ? "MMIO" : mmio32 ? "MMIO32" : "I/O port",
> + (mmio | mmio32) ? (unsigned long long) port->mapbase
> + : (unsigned long long) port->iobase,
> device->options);

That printk has just got out of control. We should at the very least
parenthesise that ?:?: thing before someone sees it and dies. Or just
rip it up and reimplement it. Note that mapbase can be printed with %p
and iobase with %pr, but the code munges them both into ull's and uses
%llx.

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