public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: Fix printk warnings in probe.c
@ 2008-08-22 18:46 Johann Felix Soden
  2008-08-27 23:36 ` Jesse Barnes
  2008-08-28 22:27 ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: Johann Felix Soden @ 2008-08-22 18:46 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-pci, linux-kernel

From: Johann Felix Soden <johfel@users.sourceforge.net>

Fix printk format warnings:
drivers/pci/probe.c: In function 'pci_read_bridge_bases':
drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
---
 drivers/pci/probe.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index cce2f4c..0ad9367 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -383,7 +383,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 			res->start = base;
 		if (!res->end)
 			res->end = limit + 0xfff;
-		printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end);
+		printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n",
+			pci_name(dev), (unsigned long long) res->start,
+			(unsigned long long) res->end);
 	}
 
 	res = child->resource[1];
@@ -395,7 +397,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 		res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
 		res->start = base;
 		res->end = limit + 0xfffff;
-		printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), res->start, res->end);
+		printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev),
+			(unsigned long long) res->start, (unsigned long long) res->end);
 	}
 
 	res = child->resource[2];
@@ -431,7 +434,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 		res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
 		res->start = base;
 		res->end = limit + 0xfffff;
-		printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64)?"64":"32",res->start, res->end);
+		printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
+			pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
+			(unsigned long long) res->start, (unsigned long long) res->end);
 	}
 }
 
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pci: Fix printk warnings in probe.c
  2008-08-22 18:46 [PATCH] pci: Fix printk warnings in probe.c Johann Felix Soden
@ 2008-08-27 23:36 ` Jesse Barnes
  2008-08-28 22:27 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2008-08-27 23:36 UTC (permalink / raw)
  To: Johann Felix Soden; +Cc: linux-pci, linux-kernel

On Friday, August 22, 2008 11:46 am Johann Felix Soden wrote:
> From: Johann Felix Soden <johfel@users.sourceforge.net>
>
> Fix printk format warnings:
> drivers/pci/probe.c: In function 'pci_read_bridge_bases':
> drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long
> unsigned int', but argument 3 has type 'resource_size_t'
> drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long
> unsigned int', but argument 4 has type 'resource_size_t'
> drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long
> unsigned int', but argument 3 has type 'resource_size_t'
> drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long
> unsigned int', but argument 4 has type 'resource_size_t'
> drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long
> unsigned int', but argument 4 has type 'resource_size_t'
> drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long
> unsigned int', but argument 5 has type 'resource_size_t'
>
> Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>

I put both of these resource size fixes into my linux-next branch, thanks.

Jesse

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pci: Fix printk warnings in probe.c
  2008-08-22 18:46 [PATCH] pci: Fix printk warnings in probe.c Johann Felix Soden
  2008-08-27 23:36 ` Jesse Barnes
@ 2008-08-28 22:27 ` Bjorn Helgaas
  2008-08-28 22:33   ` Yinghai Lu
  1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2008-08-28 22:27 UTC (permalink / raw)
  To: Johann Felix Soden; +Cc: Jesse Barnes, linux-pci, linux-kernel, Yinghai Lu

On Friday 22 August 2008 12:46:59 pm Johann Felix Soden wrote:
> From: Johann Felix Soden <johfel@users.sourceforge.net>
> 
> Fix printk format warnings:
> drivers/pci/probe.c: In function 'pci_read_bridge_bases':
> drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
> drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
> drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
> drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
> drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
> drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'
> 
> Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
> ---
>  drivers/pci/probe.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index cce2f4c..0ad9367 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -383,7 +383,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
>  			res->start = base;
>  		if (!res->end)
>  			res->end = limit + 0xfff;
> -		printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end);
> +		printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n",
> +			pci_name(dev), (unsigned long long) res->start,
> +			(unsigned long long) res->end);

Thanks for fixing the warnings.  I wish you'd changed these at the
same time to use dev_info() and "[%#llx-%#llx]" like the rest of PCI.

I confess I don't understand where the ioport, mmio, and prefetchable
mmio resources are coming from here, but before your patch, these
printed values that look like junk on an HP nw8000:

  PCI: bridge 0000:00:01.0 io port: [2fff00002000, ef92eae800000300]
  PCI: bridge 0000:00:01.0 32bit mmio: [904fffff90400000, ef92eae800000300]
  PCI: bridge 0000:00:01.0 32bit mmio pref: [9fffffff98000000, ef92eae8]

I just returned the laptop, or I'd double-check to see whether your casts
fixed this.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pci: Fix printk warnings in probe.c
  2008-08-28 22:27 ` Bjorn Helgaas
@ 2008-08-28 22:33   ` Yinghai Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Yinghai Lu @ 2008-08-28 22:33 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Johann Felix Soden, Jesse Barnes, linux-pci, linux-kernel

On Thu, Aug 28, 2008 at 3:27 PM, Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> On Friday 22 August 2008 12:46:59 pm Johann Felix Soden wrote:
>> From: Johann Felix Soden <johfel@users.sourceforge.net>
>>
>> Fix printk format warnings:
>> drivers/pci/probe.c: In function 'pci_read_bridge_bases':
>> drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
>> drivers/pci/probe.c:386: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
>> drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
>> drivers/pci/probe.c:398: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
>> drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
>> drivers/pci/probe.c:434: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'
>>
>> Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
>> ---
>>  drivers/pci/probe.c |   11 ++++++++---
>>  1 files changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
>> index cce2f4c..0ad9367 100644
>> --- a/drivers/pci/probe.c
>> +++ b/drivers/pci/probe.c
>> @@ -383,7 +383,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
>>                       res->start = base;
>>               if (!res->end)
>>                       res->end = limit + 0xfff;
>> -             printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end);
>> +             printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n",
>> +                     pci_name(dev), (unsigned long long) res->start,
>> +                     (unsigned long long) res->end);
>
> Thanks for fixing the warnings.  I wish you'd changed these at the
> same time to use dev_info() and "[%#llx-%#llx]" like the rest of PCI.
>
> I confess I don't understand where the ioport, mmio, and prefetchable
> mmio resources are coming from here, but before your patch, these
> printed values that look like junk on an HP nw8000:
>
>  PCI: bridge 0000:00:01.0 io port: [2fff00002000, ef92eae800000300]
>  PCI: bridge 0000:00:01.0 32bit mmio: [904fffff90400000, ef92eae800000300]
>  PCI: bridge 0000:00:01.0 32bit mmio pref: [9fffffff98000000, ef92eae8]
>
> I just returned the laptop, or I'd double-check to see whether your casts
> fixed this.

you must use 32 bit with !64bit_resource..

can we just make resource_t to be ull to 32bit unconditionally?

YH

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-28 22:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22 18:46 [PATCH] pci: Fix printk warnings in probe.c Johann Felix Soden
2008-08-27 23:36 ` Jesse Barnes
2008-08-28 22:27 ` Bjorn Helgaas
2008-08-28 22:33   ` Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox