Hi Felipe,
From: Felipe Balbi [mailto:[email protected]]
Sent: Tuesday, March 09, 2010 10:21 AM
> On Tue, Mar 09, 2010 at 10:16:45AM -0600, Sergio Aguirre wrote:
> > @@ -664,6 +664,12 @@ void __init omap_serial_early_init(void)
> > struct device *dev = &pdev->dev;
> > struct plat_serial8250_port *p = dev->platform_data;
> >
> > + /* Don't map zero-based physical address */
> > + if (p->mapbase == 0) {
> > + printk(KERN_WARNING "omap serial: No physical address"
> > + " for uart#%d, so skipping early_init...\n", i);
> > + continue;
>
> you have a *dev available, could you use some of the dev_* macros ? Then
> it's easy to know from where the message come from.
Ok, I didn't do that, since there are other printks in the same function.
I can change it here, no problem.
I guess I can add a separate patch to standardize and change all
printks to dev_* macros... would that make sense?
>
> > @@ -727,6 +733,14 @@ void __init omap_serial_init_port(int port)
> > pdev = &uart->pdev;
> > dev = &pdev->dev;
> >
> > + /* Don't proceed if there's no clocks available */
> > + if (unlikely(!uart->ick || !uart->fck)) {
> > + printk(KERN_ERR "Can't init uart%d, no clocks available\n",
> > + port);
> > + WARN_ON(1);
>
> change printk() + WARN_ON() into:
>
> WARN(1, "%s: can't init uart%d, no clocks available\n",
> koject_name(&dev->kobj), port);
That looks nicer. Thanks!
Regards,
Sergio
>
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html