aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-29 01:36:33 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-29 02:02:35 -0400
commit8867cd7c8678ff2d9d0382dbbfbcc7a3e7e61cbc (patch)
tree6674bc3736fe672dfbaef9c389fa21ac9ec39c1a /drivers/infiniband
parentb30200616f97a81243e6d0c644d8ab06bf0b8115 (diff)
infiniband: use %p6 for printing message ids
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/sysfs.c10
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mcg.c23
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c31
3 files changed, 7 insertions, 57 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 4d1042115598..e985193d631c 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
262 if (ret) 262 if (ret)
263 return ret; 263 return ret;
264 264
265 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 265 return sprintf(buf, "%p6\n", gid.raw);
266 be16_to_cpu(((__be16 *) gid.raw)[0]),
267 be16_to_cpu(((__be16 *) gid.raw)[1]),
268 be16_to_cpu(((__be16 *) gid.raw)[2]),
269 be16_to_cpu(((__be16 *) gid.raw)[3]),
270 be16_to_cpu(((__be16 *) gid.raw)[4]),
271 be16_to_cpu(((__be16 *) gid.raw)[5]),
272 be16_to_cpu(((__be16 *) gid.raw)[6]),
273 be16_to_cpu(((__be16 *) gid.raw)[7]));
274} 266}
275 267
276static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr, 268static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c
index 3f5f94879208..693bed0b2d1c 100644
--- a/drivers/infiniband/hw/mthca/mthca_mcg.c
+++ b/drivers/infiniband/hw/mthca/mthca_mcg.c
@@ -87,17 +87,7 @@ static int find_mgm(struct mthca_dev *dev,
87 } 87 }
88 88
89 if (0) 89 if (0)
90 mthca_dbg(dev, "Hash for %04x:%04x:%04x:%04x:" 90 mthca_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
91 "%04x:%04x:%04x:%04x is %04x\n",
92 be16_to_cpu(((__be16 *) gid)[0]),
93 be16_to_cpu(((__be16 *) gid)[1]),
94 be16_to_cpu(((__be16 *) gid)[2]),
95 be16_to_cpu(((__be16 *) gid)[3]),
96 be16_to_cpu(((__be16 *) gid)[4]),
97 be16_to_cpu(((__be16 *) gid)[5]),
98 be16_to_cpu(((__be16 *) gid)[6]),
99 be16_to_cpu(((__be16 *) gid)[7]),
100 *hash);
101 91
102 *index = *hash; 92 *index = *hash;
103 *prev = -1; 93 *prev = -1;
@@ -264,16 +254,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
264 goto out; 254 goto out;
265 255
266 if (index == -1) { 256 if (index == -1) {
267 mthca_err(dev, "MGID %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x " 257 mthca_err(dev, "MGID %p6 not found\n", gid->raw);
268 "not found\n",
269 be16_to_cpu(((__be16 *) gid->raw)[0]),
270 be16_to_cpu(((__be16 *) gid->raw)[1]),
271 be16_to_cpu(((__be16 *) gid->raw)[2]),
272 be16_to_cpu(((__be16 *) gid->raw)[3]),
273 be16_to_cpu(((__be16 *) gid->raw)[4]),
274 be16_to_cpu(((__be16 *) gid->raw)[5]),
275 be16_to_cpu(((__be16 *) gid->raw)[6]),
276 be16_to_cpu(((__be16 *) gid->raw)[7]));
277 err = -EINVAL; 258 err = -EINVAL;
278 goto out; 259 goto out;
279 } 260 }
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 5b8b533f2908..bc825310c6db 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1514,15 +1514,7 @@ static ssize_t show_dgid(struct device *dev, struct device_attribute *attr,
1514 target->state == SRP_TARGET_REMOVED) 1514 target->state == SRP_TARGET_REMOVED)
1515 return -ENODEV; 1515 return -ENODEV;
1516 1516
1517 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1517 return sprintf(buf, "%p6\n", target->path.dgid.raw);
1518 be16_to_cpu(((__be16 *) target->path.dgid.raw)[0]),
1519 be16_to_cpu(((__be16 *) target->path.dgid.raw)[1]),
1520 be16_to_cpu(((__be16 *) target->path.dgid.raw)[2]),
1521 be16_to_cpu(((__be16 *) target->path.dgid.raw)[3]),
1522 be16_to_cpu(((__be16 *) target->path.dgid.raw)[4]),
1523 be16_to_cpu(((__be16 *) target->path.dgid.raw)[5]),
1524 be16_to_cpu(((__be16 *) target->path.dgid.raw)[6]),
1525 be16_to_cpu(((__be16 *) target->path.dgid.raw)[7]));
1526} 1518}
1527 1519
1528static ssize_t show_orig_dgid(struct device *dev, 1520static ssize_t show_orig_dgid(struct device *dev,
@@ -1534,15 +1526,7 @@ static ssize_t show_orig_dgid(struct device *dev,
1534 target->state == SRP_TARGET_REMOVED) 1526 target->state == SRP_TARGET_REMOVED)
1535 return -ENODEV; 1527 return -ENODEV;
1536 1528
1537 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1529 return sprintf(buf, "%p6\n", target->orig_dgid);
1538 be16_to_cpu(target->orig_dgid[0]),
1539 be16_to_cpu(target->orig_dgid[1]),
1540 be16_to_cpu(target->orig_dgid[2]),
1541 be16_to_cpu(target->orig_dgid[3]),
1542 be16_to_cpu(target->orig_dgid[4]),
1543 be16_to_cpu(target->orig_dgid[5]),
1544 be16_to_cpu(target->orig_dgid[6]),
1545 be16_to_cpu(target->orig_dgid[7]));
1546} 1530}
1547 1531
1548static ssize_t show_zero_req_lim(struct device *dev, 1532static ssize_t show_zero_req_lim(struct device *dev,
@@ -1883,19 +1867,12 @@ static ssize_t srp_create_target(struct device *dev,
1883 1867
1884 shost_printk(KERN_DEBUG, target->scsi_host, PFX 1868 shost_printk(KERN_DEBUG, target->scsi_host, PFX
1885 "new target: id_ext %016llx ioc_guid %016llx pkey %04x " 1869 "new target: id_ext %016llx ioc_guid %016llx pkey %04x "
1886 "service_id %016llx dgid %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1870 "service_id %016llx dgid %p6\n",
1887 (unsigned long long) be64_to_cpu(target->id_ext), 1871 (unsigned long long) be64_to_cpu(target->id_ext),
1888 (unsigned long long) be64_to_cpu(target->ioc_guid), 1872 (unsigned long long) be64_to_cpu(target->ioc_guid),
1889 be16_to_cpu(target->path.pkey), 1873 be16_to_cpu(target->path.pkey),
1890 (unsigned long long) be64_to_cpu(target->service_id), 1874 (unsigned long long) be64_to_cpu(target->service_id),
1891 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[0]), 1875 target->path.dgid.raw);
1892 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[2]),
1893 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[4]),
1894 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[6]),
1895 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[8]),
1896 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[10]),
1897 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[12]),
1898 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[14]));
1899 1876
1900 ret = srp_create_target_ib(target); 1877 ret = srp_create_target_ib(target);
1901 if (ret) 1878 if (ret)