Re: [RFC part1/2 merge v3][PATCH 01/10] OMAP3: serial: Check for zero-based physical addr

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

 



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.

> @@ -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);

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux