Re: [PATCH v2] pci: pci-mvebu: Use '%pa' for printing 'phys_addr_t' type

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

 



Dear Fabio Estevam,

On Tue, 29 Apr 2014 00:24:56 -0300, Fabio Estevam wrote:

>  		if (ret) {
>  			dev_err(&port->pcie->pdev->dev,
> -				"Could not create MBus window at 0x%x, size 0x%x: %d\n",
> -				base, sz, ret);
> +				"Could not create MBus window at [mem %pa - %pa] :%d\n",
> +				&base, &base + sz, ret);

Are you sure '&base + sz' works here? %pa needs a reference as
argument, so &base looks good. But '&base + sz' means you will print
the value which is at the address of base, to which 'sz' is added,
which is not what we want here. Probably you need something like:

	phys_addr_t end = base + sz;

and then use '&end'.

Or I am missing something?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux