]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/core/sysfs.c
Merge branch 'linus' into x86/cleanups
[linux-2.6-omap-h63xx.git] / drivers / infiniband / core / sysfs.c
index 4d1042115598d39b95ccc76b12b80da0cbdf89c6..4f4d1bb9f069fa6a8f61c0027eb1f07c377d3664 100644 (file)
@@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
        if (ret)
                return ret;
 
-       return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
-                      be16_to_cpu(((__be16 *) gid.raw)[0]),
-                      be16_to_cpu(((__be16 *) gid.raw)[1]),
-                      be16_to_cpu(((__be16 *) gid.raw)[2]),
-                      be16_to_cpu(((__be16 *) gid.raw)[3]),
-                      be16_to_cpu(((__be16 *) gid.raw)[4]),
-                      be16_to_cpu(((__be16 *) gid.raw)[5]),
-                      be16_to_cpu(((__be16 *) gid.raw)[6]),
-                      be16_to_cpu(((__be16 *) gid.raw)[7]));
+       return sprintf(buf, "%pI6\n", gid.raw);
 }
 
 static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,