Commit 8867cd7c authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller

infiniband: use %p6 for printing message ids

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3020061
...@@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr, ...@@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
if (ret) if (ret)
return ret; return ret;
return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", return sprintf(buf, "%p6\n", gid.raw);
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]));
} }
static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr, static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
......
...@@ -87,17 +87,7 @@ static int find_mgm(struct mthca_dev *dev, ...@@ -87,17 +87,7 @@ static int find_mgm(struct mthca_dev *dev,
} }
if (0) if (0)
mthca_dbg(dev, "Hash for %04x:%04x:%04x:%04x:" mthca_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
"%04x:%04x:%04x:%04x is %04x\n",
be16_to_cpu(((__be16 *) gid)[0]),
be16_to_cpu(((__be16 *) gid)[1]),
be16_to_cpu(((__be16 *) gid)[2]),
be16_to_cpu(((__be16 *) gid)[3]),
be16_to_cpu(((__be16 *) gid)[4]),
be16_to_cpu(((__be16 *) gid)[5]),
be16_to_cpu(((__be16 *) gid)[6]),
be16_to_cpu(((__be16 *) gid)[7]),
*hash);
*index = *hash; *index = *hash;
*prev = -1; *prev = -1;
...@@ -264,16 +254,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) ...@@ -264,16 +254,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
goto out; goto out;
if (index == -1) { if (index == -1) {
mthca_err(dev, "MGID %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x " mthca_err(dev, "MGID %p6 not found\n", gid->raw);
"not found\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]));
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
......
...@@ -1514,15 +1514,7 @@ static ssize_t show_dgid(struct device *dev, struct device_attribute *attr, ...@@ -1514,15 +1514,7 @@ static ssize_t show_dgid(struct device *dev, struct device_attribute *attr,
target->state == SRP_TARGET_REMOVED) target->state == SRP_TARGET_REMOVED)
return -ENODEV; return -ENODEV;
return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", return sprintf(buf, "%p6\n", target->path.dgid.raw);
be16_to_cpu(((__be16 *) target->path.dgid.raw)[0]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[1]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[2]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[3]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[4]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[5]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[6]),
be16_to_cpu(((__be16 *) target->path.dgid.raw)[7]));
} }
static ssize_t show_orig_dgid(struct device *dev, static ssize_t show_orig_dgid(struct device *dev,
...@@ -1534,15 +1526,7 @@ static ssize_t show_orig_dgid(struct device *dev, ...@@ -1534,15 +1526,7 @@ static ssize_t show_orig_dgid(struct device *dev,
target->state == SRP_TARGET_REMOVED) target->state == SRP_TARGET_REMOVED)
return -ENODEV; return -ENODEV;
return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", return sprintf(buf, "%p6\n", target->orig_dgid);
be16_to_cpu(target->orig_dgid[0]),
be16_to_cpu(target->orig_dgid[1]),
be16_to_cpu(target->orig_dgid[2]),
be16_to_cpu(target->orig_dgid[3]),
be16_to_cpu(target->orig_dgid[4]),
be16_to_cpu(target->orig_dgid[5]),
be16_to_cpu(target->orig_dgid[6]),
be16_to_cpu(target->orig_dgid[7]));
} }
static ssize_t show_zero_req_lim(struct device *dev, static ssize_t show_zero_req_lim(struct device *dev,
...@@ -1883,19 +1867,12 @@ static ssize_t srp_create_target(struct device *dev, ...@@ -1883,19 +1867,12 @@ static ssize_t srp_create_target(struct device *dev,
shost_printk(KERN_DEBUG, target->scsi_host, PFX shost_printk(KERN_DEBUG, target->scsi_host, PFX
"new target: id_ext %016llx ioc_guid %016llx pkey %04x " "new target: id_ext %016llx ioc_guid %016llx pkey %04x "
"service_id %016llx dgid %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", "service_id %016llx dgid %p6\n",
(unsigned long long) be64_to_cpu(target->id_ext), (unsigned long long) be64_to_cpu(target->id_ext),
(unsigned long long) be64_to_cpu(target->ioc_guid), (unsigned long long) be64_to_cpu(target->ioc_guid),
be16_to_cpu(target->path.pkey), be16_to_cpu(target->path.pkey),
(unsigned long long) be64_to_cpu(target->service_id), (unsigned long long) be64_to_cpu(target->service_id),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[0]), target->path.dgid.raw);
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[2]),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[4]),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[6]),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[8]),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[10]),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[12]),
(int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[14]));
ret = srp_create_target_ib(target); ret = srp_create_target_ib(target);
if (ret) if (ret)
......
...@@ -118,17 +118,7 @@ static int find_mgm(struct mlx4_dev *dev, ...@@ -118,17 +118,7 @@ static int find_mgm(struct mlx4_dev *dev,
return err; return err;
if (0) if (0)
mlx4_dbg(dev, "Hash for %04x:%04x:%04x:%04x:" mlx4_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
"%04x:%04x:%04x:%04x is %04x\n",
be16_to_cpu(((__be16 *) gid)[0]),
be16_to_cpu(((__be16 *) gid)[1]),
be16_to_cpu(((__be16 *) gid)[2]),
be16_to_cpu(((__be16 *) gid)[3]),
be16_to_cpu(((__be16 *) gid)[4]),
be16_to_cpu(((__be16 *) gid)[5]),
be16_to_cpu(((__be16 *) gid)[6]),
be16_to_cpu(((__be16 *) gid)[7]),
*hash);
*index = *hash; *index = *hash;
*prev = -1; *prev = -1;
...@@ -277,16 +267,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]) ...@@ -277,16 +267,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16])
goto out; goto out;
if (index == -1) { if (index == -1) {
mlx4_err(dev, "MGID %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x " mlx4_err(dev, "MGID %p6 not found\n", gid);
"not found\n",
be16_to_cpu(((__be16 *) gid)[0]),
be16_to_cpu(((__be16 *) gid)[1]),
be16_to_cpu(((__be16 *) gid)[2]),
be16_to_cpu(((__be16 *) gid)[3]),
be16_to_cpu(((__be16 *) gid)[4]),
be16_to_cpu(((__be16 *) gid)[5]),
be16_to_cpu(((__be16 *) gid)[6]),
be16_to_cpu(((__be16 *) gid)[7]));
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment