2005-03-02 05:33:05

by Randy.Dunlap

[permalink] [raw]
Subject: [PATCH] aoe: fix printk warning (sparc64)


aoeblk: mac_addr() returns u64, coerce to unsigned long long to printk it:
(sparc64 build warning)

drivers/block/aoe/aoeblk.c:245: warning: long long unsigned int format, u64 arg (arg 2)
drivers/block/aoe/aoeblk.c:31: warning: long long unsigned int format, u64 arg (arg 4)

cross-compile results:
https://www.osdl.org/plm-cgi/plm?module=patch_info&patch_id=4239

Signed-off-by: Randy Dunlap <[email protected]>

diffstat:=
drivers/block/aoe/aoeblk.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff -Naurp ./drivers/block/aoe/aoeblk.c~aoe_printk ./drivers/block/aoe/aoeblk.c
--- ./drivers/block/aoe/aoeblk.c~aoe_printk 2005-02-25 10:54:42.000000000 -0800
+++ ./drivers/block/aoe/aoeblk.c 2005-03-01 17:22:29.735503376 -0800
@@ -28,7 +28,8 @@ static ssize_t aoedisk_show_mac(struct g
{
struct aoedev *d = disk->private_data;

- return snprintf(page, PAGE_SIZE, "%012llx\n", mac_addr(d->addr));
+ return snprintf(page, PAGE_SIZE, "%012llx\n",
+ (unsigned long long)mac_addr(d->addr));
}
static ssize_t aoedisk_show_netif(struct gendisk * disk, char *page)
{
@@ -241,7 +242,8 @@ aoeblk_gdalloc(void *vp)
aoedisk_add_sysfs(d);

printk(KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu "
- "sectors\n", mac_addr(d->addr), d->aoemajor, d->aoeminor,
+ "sectors\n", (unsigned long long)mac_addr(d->addr),
+ d->aoemajor, d->aoeminor,
d->fw_ver, (long long)d->ssize);
}


---


2005-03-02 17:43:11

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH] aoe: fix printk warning (sparc64)

Randy Dunlap writes:

> aoeblk: mac_addr() returns u64, coerce to unsigned long long to printk it:
> (sparc64 build warning)
>
> drivers/block/aoe/aoeblk.c:245: warning: long long unsigned int format, u64 arg (arg 2)
> drivers/block/aoe/aoeblk.c:31: warning: long long unsigned int format, u64 arg (arg 4)
>
> cross-compile results:
> https://www.osdl.org/plm-cgi/plm?module=patch_info&patch_id=4239

Thanks. I have a few patches I'll be sending along soon (today, I
hope) in a batch, including Alexey Dobriyan's recent sparse cleanups,
and I'll include this one among them.

--
Ed L Cashin <[email protected]>