aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorEd L. Cashin <ecashin@coraid.com>2008-02-08 07:20:01 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:31 -0500
commit1eb0da4cea28ae8f1bbe61822a2cc04e6d074e03 (patch)
tree5f5e63711244ee845fe1bfb4faf1116605d0e053 /drivers/block
parent68e0d42f39d85b334d3867a4e5fc2e0e775c1a6c (diff)
aoe: mac_addr: avoid 64-bit arch compiler warnings
By returning unsigned long long, mac_addr does not generate compiler warnings on 64-bit architectures. Signed-off-by: Ed L. Cashin <ecashin@coraid.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/aoe/aoe.h2
-rw-r--r--drivers/block/aoe/aoeblk.c3
-rw-r--r--drivers/block/aoe/aoecmd.c10
-rw-r--r--drivers/block/aoe/aoenet.c4
4 files changed, 9 insertions, 10 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index 87df18bf4dea..aecaac3f2e58 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -198,4 +198,4 @@ void aoenet_xmit(struct sk_buff *);
198int is_aoe_netif(struct net_device *ifp); 198int is_aoe_netif(struct net_device *ifp);
199int set_aoe_iflist(const char __user *str, size_t size); 199int set_aoe_iflist(const char __user *str, size_t size);
200 200
201u64 mac_addr(char addr[6]); 201unsigned long long mac_addr(char addr[6]);
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index c2649c954278..deea536cc844 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -37,8 +37,7 @@ static ssize_t aoedisk_show_mac(struct device *dev,
37 37
38 if (t == NULL) 38 if (t == NULL)
39 return snprintf(page, PAGE_SIZE, "none\n"); 39 return snprintf(page, PAGE_SIZE, "none\n");
40 return snprintf(page, PAGE_SIZE, "%012llx\n", 40 return snprintf(page, PAGE_SIZE, "%012llx\n", mac_addr(t->addr));
41 (unsigned long long)mac_addr(t->addr));
42} 41}
43static ssize_t aoedisk_show_netif(struct device *dev, 42static ssize_t aoedisk_show_netif(struct device *dev,
44 struct device_attribute *attr, char *page) 43 struct device_attribute *attr, char *page)
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 5e7daa1ff6f6..1be5150bcd3b 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -309,7 +309,8 @@ resend(struct aoedev *d, struct aoetgt *t, struct frame *f)
309 "%15s e%ld.%d oldtag=%08x@%08lx newtag=%08x " 309 "%15s e%ld.%d oldtag=%08x@%08lx newtag=%08x "
310 "s=%012llx d=%012llx nout=%d\n", 310 "s=%012llx d=%012llx nout=%d\n",
311 "retransmit", d->aoemajor, d->aoeminor, f->tag, jiffies, n, 311 "retransmit", d->aoemajor, d->aoeminor, f->tag, jiffies, n,
312 mac_addr(h->src), mac_addr(h->dst), t->nout); 312 mac_addr(h->src),
313 mac_addr(h->dst), t->nout);
313 aoechr_error(buf); 314 aoechr_error(buf);
314 315
315 f->tag = n; 316 f->tag = n;
@@ -633,7 +634,7 @@ ataid_complete(struct aoedev *d, struct aoetgt *t, unsigned char *id)
633 634
634 if (d->ssize != ssize) 635 if (d->ssize != ssize)
635 printk(KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu sectors\n", 636 printk(KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu sectors\n",
636 (unsigned long long)mac_addr(t->addr), 637 mac_addr(t->addr),
637 d->aoemajor, d->aoeminor, 638 d->aoemajor, d->aoeminor,
638 d->fw_ver, (long long)ssize); 639 d->fw_ver, (long long)ssize);
639 d->ssize = ssize; 640 d->ssize = ssize;
@@ -727,8 +728,7 @@ aoecmd_ata_rsp(struct sk_buff *skb)
727 t = gettgt(d, hin->src); 728 t = gettgt(d, hin->src);
728 if (t == NULL) { 729 if (t == NULL) {
729 printk(KERN_INFO "aoe: can't find target e%ld.%d:%012llx\n", 730 printk(KERN_INFO "aoe: can't find target e%ld.%d:%012llx\n",
730 d->aoemajor, d->aoeminor, 731 d->aoemajor, d->aoeminor, mac_addr(hin->src));
731 (unsigned long long) mac_addr(hin->src));
732 spin_unlock_irqrestore(&d->lock, flags); 732 spin_unlock_irqrestore(&d->lock, flags);
733 return; 733 return;
734 } 734 }
@@ -1003,7 +1003,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
1003 "aoe: e%ld.%d: setting %d%s%s:%012llx\n", 1003 "aoe: e%ld.%d: setting %d%s%s:%012llx\n",
1004 d->aoemajor, d->aoeminor, n, 1004 d->aoemajor, d->aoeminor, n,
1005 " byte data frames on ", ifp->nd->name, 1005 " byte data frames on ", ifp->nd->name,
1006 (unsigned long long) mac_addr(t->addr)); 1006 mac_addr(t->addr));
1007 ifp->maxbcnt = n; 1007 ifp->maxbcnt = n;
1008 } 1008 }
1009 } 1009 }
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 7a38a45ce110..ada4a06645e1 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -83,7 +83,7 @@ set_aoe_iflist(const char __user *user_str, size_t size)
83 return 0; 83 return 0;
84} 84}
85 85
86u64 86unsigned long long
87mac_addr(char addr[6]) 87mac_addr(char addr[6])
88{ 88{
89 __be64 n = 0; 89 __be64 n = 0;
@@ -91,7 +91,7 @@ mac_addr(char addr[6])
91 91
92 memcpy(p + 2, addr, 6); /* (sizeof addr != 6) */ 92 memcpy(p + 2, addr, 6); /* (sizeof addr != 6) */
93 93
94 return __be64_to_cpu(n); 94 return (unsigned long long) __be64_to_cpu(n);
95} 95}
96 96
97void 97void