提交 15b0dc1e 编写于 作者: W Wenpeng Liang 提交者: Xie XiuQi

RDMA/hns: Correct the type of printf information

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Correct the type of printf information.

Feature or Bugfix:Bugfix
Signed-off-by: NWenpeng Liang <liangwenpeng@huawei.com>
Reviewed-by: Nliuyixian <liuyixian@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 65b1cbfb
...@@ -101,7 +101,7 @@ static int hns_roce_add_gid(const union ib_gid *gid, ...@@ -101,7 +101,7 @@ static int hns_roce_add_gid(const union ib_gid *gid,
if (port >= hr_dev->caps.num_ports || if (port >= hr_dev->caps.num_ports ||
attr->index > hr_dev->caps.gid_table_len[port]) { attr->index > hr_dev->caps.gid_table_len[port]) {
dev_err(hr_dev->dev, "add gid failed. port - %d, index - %d\n", dev_err(hr_dev->dev, "add gid failed. port - %u, index - %u\n",
port, attr->index); port, attr->index);
return -EINVAL; return -EINVAL;
} }
...@@ -114,7 +114,7 @@ static int hns_roce_add_gid(const union ib_gid *gid, ...@@ -114,7 +114,7 @@ static int hns_roce_add_gid(const union ib_gid *gid,
#endif #endif
if (ret) if (ret)
dev_err(hr_dev->dev, "set gid failed(%d), index = %d", ret, dev_err(hr_dev->dev, "set gid failed(%d), index = %u", ret,
attr->index); attr->index);
return ret; return ret;
...@@ -129,14 +129,14 @@ static int hns_roce_del_gid(const struct ib_gid_attr *attr, void **context) ...@@ -129,14 +129,14 @@ static int hns_roce_del_gid(const struct ib_gid_attr *attr, void **context)
if (port >= hr_dev->caps.num_ports) { if (port >= hr_dev->caps.num_ports) {
dev_err(hr_dev->dev, dev_err(hr_dev->dev,
"Port num %d id large than max port num %d.\n", "Port num %u id large than max port num %u.\n",
port, hr_dev->caps.num_ports); port, hr_dev->caps.num_ports);
return -EINVAL; return -EINVAL;
} }
ret = hr_dev->hw->set_gid(hr_dev, port, attr->index, &zgid, &zattr); ret = hr_dev->hw->set_gid(hr_dev, port, attr->index, &zgid, &zattr);
if (ret) if (ret)
dev_warn(hr_dev->dev, "del gid failed(%d), index = %d", ret, dev_warn(hr_dev->dev, "del gid failed(%d), index = %u", ret,
attr->index); attr->index);
return ret; return ret;
...@@ -154,7 +154,7 @@ static int hns_roce_add_gid(struct ib_device *device, u8 port_num, ...@@ -154,7 +154,7 @@ static int hns_roce_add_gid(struct ib_device *device, u8 port_num,
if (port >= hr_dev->caps.num_ports || if (port >= hr_dev->caps.num_ports ||
index > hr_dev->caps.gid_table_len[port]) { index > hr_dev->caps.gid_table_len[port]) {
dev_err(hr_dev->dev, "add gid failed. port - %d, index - %d\n", dev_err(hr_dev->dev, "add gid failed. port - %u, index - %u\n",
port, index); port, index);
return -EINVAL; return -EINVAL;
} }
...@@ -162,7 +162,7 @@ static int hns_roce_add_gid(struct ib_device *device, u8 port_num, ...@@ -162,7 +162,7 @@ static int hns_roce_add_gid(struct ib_device *device, u8 port_num,
ret = hr_dev->hw->set_gid(hr_dev, port, index, (union ib_gid *)gid, ret = hr_dev->hw->set_gid(hr_dev, port, index, (union ib_gid *)gid,
attr); attr);
if (ret) if (ret)
dev_err(hr_dev->dev, "set gid failed(%d), index = %d", dev_err(hr_dev->dev, "set gid failed(%d), index = %u",
ret, index); ret, index);
return ret; return ret;
...@@ -181,14 +181,14 @@ static int hns_roce_del_gid(struct ib_device *device, u8 port_num, ...@@ -181,14 +181,14 @@ static int hns_roce_del_gid(struct ib_device *device, u8 port_num,
if (port >= hr_dev->caps.num_ports) { if (port >= hr_dev->caps.num_ports) {
dev_err(hr_dev->dev, dev_err(hr_dev->dev,
"Port num %d id large than max port num %d.\n", "Port num %u id large than max port num %u.\n",
port, hr_dev->caps.num_ports); port, hr_dev->caps.num_ports);
return -EINVAL; return -EINVAL;
} }
ret = hr_dev->hw->set_gid(hr_dev, port, index, &zgid, &zattr); ret = hr_dev->hw->set_gid(hr_dev, port, index, &zgid, &zattr);
if (ret) if (ret)
dev_warn(hr_dev->dev, "del gid failed(%d), index = %d", ret, dev_warn(hr_dev->dev, "del gid failed(%d), index = %u", ret,
index); index);
return ret; return ret;
...@@ -207,7 +207,7 @@ static int handle_en_event(struct hns_roce_dev *hr_dev, u8 port, ...@@ -207,7 +207,7 @@ static int handle_en_event(struct hns_roce_dev *hr_dev, u8 port,
netdev = hr_dev->iboe.netdevs[port]; netdev = hr_dev->iboe.netdevs[port];
if (!netdev) { if (!netdev) {
dev_err(dev, "port(%d) can't find netdev\n", port); dev_err(dev, "port(%u) can't find netdev\n", port);
return -ENODEV; return -ENODEV;
} }
...@@ -416,7 +416,7 @@ static int hns_roce_query_port(struct ib_device *ib_dev, u8 port_num, ...@@ -416,7 +416,7 @@ static int hns_roce_query_port(struct ib_device *ib_dev, u8 port_num,
net_dev = hr_dev->iboe.netdevs[port]; net_dev = hr_dev->iboe.netdevs[port];
if (!net_dev) { if (!net_dev) {
spin_unlock_irqrestore(&hr_dev->iboe.lock, flags); spin_unlock_irqrestore(&hr_dev->iboe.lock, flags);
dev_err(dev, "find netdev %d failed!\r\n", port); dev_err(dev, "find netdev %u failed!\r\n", port);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册