RDMA/hns: Modify appropriate printings
Modify some printings that is not in uniformed style, non-standard or with spelling errors. Link: https://lore.kernel.org/r/1572952082-6681-10-git-send-email-liweihang@hisilicon.com Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Weihang Li <liweihang@hisilicon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
1ceb0b11a8
commit
d11769fdc1
|
@ -105,32 +105,34 @@ static int hns_roce_cq_alloc(struct hns_roce_dev *hr_dev, int nent,
|
||||||
mtts = hns_roce_table_find(hr_dev, mtt_table,
|
mtts = hns_roce_table_find(hr_dev, mtt_table,
|
||||||
hr_mtt->first_seg, &dma_handle);
|
hr_mtt->first_seg, &dma_handle);
|
||||||
if (!mtts) {
|
if (!mtts) {
|
||||||
dev_err(dev, "CQ alloc.Failed to find cq buf addr.\n");
|
dev_err(dev, "Failed to find mtt for CQ buf.\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vector >= hr_dev->caps.num_comp_vectors) {
|
if (vector >= hr_dev->caps.num_comp_vectors) {
|
||||||
dev_err(dev, "CQ alloc.Invalid vector.\n");
|
dev_err(dev, "Invalid vector(0x%x) for CQ alloc.\n", vector);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
hr_cq->vector = vector;
|
hr_cq->vector = vector;
|
||||||
|
|
||||||
ret = hns_roce_bitmap_alloc(&cq_table->bitmap, &hr_cq->cqn);
|
ret = hns_roce_bitmap_alloc(&cq_table->bitmap, &hr_cq->cqn);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "CQ alloc.Failed to alloc index.\n");
|
dev_err(dev, "Num of CQ out of range.\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get CQC memory HEM(Hardware Entry Memory) table */
|
/* Get CQC memory HEM(Hardware Entry Memory) table */
|
||||||
ret = hns_roce_table_get(hr_dev, &cq_table->table, hr_cq->cqn);
|
ret = hns_roce_table_get(hr_dev, &cq_table->table, hr_cq->cqn);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "CQ alloc.Failed to get context mem.\n");
|
dev_err(dev,
|
||||||
|
"Get context mem failed(%d) when CQ(0x%lx) alloc.\n",
|
||||||
|
ret, hr_cq->cqn);
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = xa_err(xa_store(&cq_table->array, hr_cq->cqn, hr_cq, GFP_KERNEL));
|
ret = xa_err(xa_store(&cq_table->array, hr_cq->cqn, hr_cq, GFP_KERNEL));
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "CQ alloc failed xa_store.\n");
|
dev_err(dev, "Failed to xa_store CQ.\n");
|
||||||
goto err_put;
|
goto err_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +150,9 @@ static int hns_roce_cq_alloc(struct hns_roce_dev *hr_dev, int nent,
|
||||||
ret = hns_roce_hw_create_cq(hr_dev, mailbox, hr_cq->cqn);
|
ret = hns_roce_hw_create_cq(hr_dev, mailbox, hr_cq->cqn);
|
||||||
hns_roce_free_cmd_mailbox(hr_dev, mailbox);
|
hns_roce_free_cmd_mailbox(hr_dev, mailbox);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "CQ alloc.Failed to cmd mailbox.\n");
|
dev_err(dev,
|
||||||
|
"Send cmd mailbox failed(%d) when CQ(0x%lx) alloc.\n",
|
||||||
|
ret, hr_cq->cqn);
|
||||||
goto err_xa;
|
goto err_xa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +422,7 @@ int hns_roce_ib_create_cq(struct ib_cq *ib_cq,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (cq_entries < 1 || cq_entries > hr_dev->caps.max_cqes) {
|
if (cq_entries < 1 || cq_entries > hr_dev->caps.max_cqes) {
|
||||||
dev_err(dev, "Creat CQ failed. entries=%d, max=%d\n",
|
dev_err(dev, "Create CQ failed. entries=%d, max=%d\n",
|
||||||
cq_entries, hr_dev->caps.max_cqes);
|
cq_entries, hr_dev->caps.max_cqes);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -448,7 +452,7 @@ int hns_roce_ib_create_cq(struct ib_cq *ib_cq,
|
||||||
ret = hns_roce_cq_alloc(hr_dev, cq_entries, &hr_cq->hr_buf.hr_mtt,
|
ret = hns_roce_cq_alloc(hr_dev, cq_entries, &hr_cq->hr_buf.hr_mtt,
|
||||||
hr_cq, vector);
|
hr_cq, vector);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Creat CQ .Failed to cq_alloc.\n");
|
dev_err(dev, "Alloc CQ failed(%d).\n", ret);
|
||||||
goto err_dbmap;
|
goto err_dbmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,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, "Can't find netdev on port(%u)!\n", port);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,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!\n", port);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ struct ib_qp *hns_roce_create_qp(struct ib_pd *pd,
|
||||||
ret = hns_roce_create_qp_common(hr_dev, pd, init_attr, udata, 0,
|
ret = hns_roce_create_qp_common(hr_dev, pd, init_attr, udata, 0,
|
||||||
hr_qp);
|
hr_qp);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ibdev_err(ibdev, "Create RC QP 0x%06lx failed(%d)\n",
|
ibdev_err(ibdev, "Create QP 0x%06lx failed(%d)\n",
|
||||||
hr_qp->qpn, ret);
|
hr_qp->qpn, ret);
|
||||||
kfree(hr_qp);
|
kfree(hr_qp);
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
|
|
|
@ -95,8 +95,7 @@ static int hns_roce_srq_alloc(struct hns_roce_dev *hr_dev, u32 pdn, u32 cqn,
|
||||||
srq->mtt.first_seg,
|
srq->mtt.first_seg,
|
||||||
&dma_handle_wqe);
|
&dma_handle_wqe);
|
||||||
if (!mtts_wqe) {
|
if (!mtts_wqe) {
|
||||||
dev_err(hr_dev->dev,
|
dev_err(hr_dev->dev, "Failed to find mtt for srq buf.\n");
|
||||||
"SRQ alloc.Failed to find srq buf addr.\n");
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,13 +105,14 @@ static int hns_roce_srq_alloc(struct hns_roce_dev *hr_dev, u32 pdn, u32 cqn,
|
||||||
&dma_handle_idx);
|
&dma_handle_idx);
|
||||||
if (!mtts_idx) {
|
if (!mtts_idx) {
|
||||||
dev_err(hr_dev->dev,
|
dev_err(hr_dev->dev,
|
||||||
"SRQ alloc.Failed to find idx que buf addr.\n");
|
"Failed to find mtt for srq idx queue buf.\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = hns_roce_bitmap_alloc(&srq_table->bitmap, &srq->srqn);
|
ret = hns_roce_bitmap_alloc(&srq_table->bitmap, &srq->srqn);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(hr_dev->dev, "SRQ alloc.Failed to alloc index.\n");
|
dev_err(hr_dev->dev,
|
||||||
|
"Failed to alloc a bit from srq bitmap.\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue