From: "Jan Beulich" <jbeulich@novell.com>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix printk format compiler warnings
Date: Fri, 05 Sep 2008 13:06:24 +0100 [thread overview]
Message-ID: <48C13CE0.76E4.0078.0@novell.com> (raw)
%llx and the like cannot be used on u64-derived data types - they must
be cast to long long explicitly for arch-es where u64 is a typedef of
unsigned long (ia64 is where I observed the problem).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
drivers/pci/probe.c | 16 +++++++++++++---
drivers/pci/setup-bus.c | 6 +++++-
2 files changed, 18 insertions(+), 4 deletions(-)
--- linux-2.6.27-rc5/drivers/pci/probe.c 2008-08-21 14:37:32.000000000 +0200
+++ 2.6.27-rc5-pci-probe-print/drivers/pci/probe.c 2008-09-02 15:18:08.000000000 +0200
@@ -383,7 +383,10 @@ void __devinit pci_read_bridge_bases(str
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: [%Lx, %Lx]\n",
+ pci_name(dev),
+ (unsigned long long)res->start,
+ (unsigned long long)res->end);
}
res = child->resource[1];
@@ -395,7 +398,10 @@ void __devinit pci_read_bridge_bases(str
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: [%Lx, %Lx]\n",
+ pci_name(dev),
+ (unsigned long long)res->start,
+ (unsigned long long)res->end);
}
res = child->resource[2];
@@ -431,7 +437,11 @@ void __devinit pci_read_bridge_bases(str
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 %dbit mmio pref: [%Lx, %Lx]\n",
+ pci_name(dev),
+ res->flags & PCI_PREF_RANGE_TYPE_64 ? 64 : 32,
+ (unsigned long long)res->start,
+ (unsigned long long)res->end);
}
}
--- linux-2.6.27-rc5/drivers/pci/setup-bus.c 2008-08-21 14:37:32.000000000 +0200
+++ 2.6.27-rc5-pci-probe-print/drivers/pci/setup-bus.c 2008-09-02 15:18:20.000000000 +0200
@@ -539,7 +539,11 @@ static void pci_bus_dump_res(struct pci_
if (!res)
continue;
- printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end);
+ printk(KERN_INFO "bus: %02x index %x %s: [%Lx, %Lx]\n",
+ bus->number, i,
+ res->flags & IORESOURCE_IO ? "io port" : "mmio",
+ (unsigned long long)res->start,
+ (unsigned long long)res->end);
}
}
next reply other threads:[~2008-09-05 12:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 12:06 Jan Beulich [this message]
2008-09-05 21:20 ` [PATCH] fix printk format compiler warnings Andrew Morton
2008-09-09 4:54 ` Jesse Barnes
2008-09-30 11:29 ` [PATCH] checkpatch: Check for %L for all integer formats (was: Re: [PATCH] fix printk format compiler warnings) Geert Uytterhoeven
2008-09-30 13:14 ` Andy Whitcroft
2008-09-30 15:32 ` [PATCH] checkpatch: Check for %L for all integer formats (was: " Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48C13CE0.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.