diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-29 01:36:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-29 02:02:35 -0400 |
commit | 8867cd7c8678ff2d9d0382dbbfbcc7a3e7e61cbc (patch) | |
tree | 6674bc3736fe672dfbaef9c389fa21ac9ec39c1a /drivers/infiniband/ulp | |
parent | b30200616f97a81243e6d0c644d8ab06bf0b8115 (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/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 31 |
1 files changed, 4 insertions, 27 deletions
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 | ||
1528 | static ssize_t show_orig_dgid(struct device *dev, | 1520 | static 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 | ||
1548 | static ssize_t show_zero_req_lim(struct device *dev, | 1532 | static 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) |