Skip to contentSkip to conversation

firmware: fix memmap printk format warnings

PATCH In review Randy Dunlap 2 participants 2 messages Jul 11, 2008 – Jul 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: fix memmap printk format warnings

From: Randy Dunlap <[email protected]>
cc: Bernhard Walle <[email protected]>

Fix firmware/memmap printk format warnings:

linux-next-20080711/drivers/firmware/memmap.c:156: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t' linux-next-20080711/drivers/firmware/memmap.c:161: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'

---
 drivers/firmware/memmap.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/firmware/memmap.c +4 -2
@@ -153,12 +153,14 @@ int __init firmware_map_add_early(resour
 
 static ssize_t start_show(struct firmware_map_entry *entry, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "0x%llx\n", entry->start);
+	return snprintf(buf, PAGE_SIZE, "0x%llx\n",
+		(unsigned long long)entry->start);
 }
 
 static ssize_t end_show(struct firmware_map_entry *entry, char *buf)
 {
-	return snprintf(buf, PAGE_SIZE, "0x%llx\n", entry->end);
+	return snprintf(buf, PAGE_SIZE, "0x%llx\n",
+		(unsigned long long)entry->end);
 }
 
 static ssize_t type_show(struct firmware_map_entry *entry, char *buf)

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

#1 lore raw
Quoted 8 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>
cc: Bernhard Walle <[email protected]>

Fix firmware/memmap printk format warnings:

linux-next-20080711/drivers/firmware/memmap.c:156: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t' linux-next-20080711/drivers/firmware/memmap.c:161: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'

Thanks for the patch. I did not include that change in my cleanup sent to Andrew to not conflict with that patch.

Bernhard

Signature · 1 line
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development