diff options
author | Leon Romanovsky <leon@kernel.org> | 2016-11-03 10:44:25 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-03 13:12:52 -0500 |
commit | 74226649f42d34a8ade2799bfb4f3941f4adfa95 (patch) | |
tree | ad34cf8ea667efcf909cfd2b4dc066c2bb218f9a | |
parent | 93b80f29044639ce98baabd3431af9d78e9d1223 (diff) |
IB/ipoib: Remove and fix debug prints after allocation failure
The prints after [k|v][m|z|c]alloc() functions are not needed,
because in case of failure, allocator will print their internal
error prints anyway.
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 |
3 files changed, 3 insertions, 15 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 4ad297d3de89..44f152e431cb 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -355,11 +355,8 @@ static int ipoib_cm_nonsrq_init_rx(struct net_device *dev, struct ib_cm_id *cm_i | |||
355 | int i; | 355 | int i; |
356 | 356 | ||
357 | rx->rx_ring = vzalloc(ipoib_recvq_size * sizeof *rx->rx_ring); | 357 | rx->rx_ring = vzalloc(ipoib_recvq_size * sizeof *rx->rx_ring); |
358 | if (!rx->rx_ring) { | 358 | if (!rx->rx_ring) |
359 | printk(KERN_WARNING "%s: failed to allocate CM non-SRQ ring (%d entries)\n", | ||
360 | priv->ca->name, ipoib_recvq_size); | ||
361 | return -ENOMEM; | 359 | return -ENOMEM; |
362 | } | ||
363 | 360 | ||
364 | t = kmalloc(sizeof *t, GFP_KERNEL); | 361 | t = kmalloc(sizeof *t, GFP_KERNEL); |
365 | if (!t) { | 362 | if (!t) { |
@@ -1133,7 +1130,6 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, | |||
1133 | p->tx_ring = __vmalloc(ipoib_sendq_size * sizeof *p->tx_ring, | 1130 | p->tx_ring = __vmalloc(ipoib_sendq_size * sizeof *p->tx_ring, |
1134 | GFP_NOIO, PAGE_KERNEL); | 1131 | GFP_NOIO, PAGE_KERNEL); |
1135 | if (!p->tx_ring) { | 1132 | if (!p->tx_ring) { |
1136 | ipoib_warn(priv, "failed to allocate tx ring\n"); | ||
1137 | ret = -ENOMEM; | 1133 | ret = -ENOMEM; |
1138 | goto err_tx; | 1134 | goto err_tx; |
1139 | } | 1135 | } |
@@ -1549,8 +1545,6 @@ static void ipoib_cm_create_srq(struct net_device *dev, int max_sge) | |||
1549 | 1545 | ||
1550 | priv->cm.srq_ring = vzalloc(ipoib_recvq_size * sizeof *priv->cm.srq_ring); | 1546 | priv->cm.srq_ring = vzalloc(ipoib_recvq_size * sizeof *priv->cm.srq_ring); |
1551 | if (!priv->cm.srq_ring) { | 1547 | if (!priv->cm.srq_ring) { |
1552 | printk(KERN_WARNING "%s: failed to allocate CM SRQ ring (%d entries)\n", | ||
1553 | priv->ca->name, ipoib_recvq_size); | ||
1554 | ib_destroy_srq(priv->cm.srq); | 1548 | ib_destroy_srq(priv->cm.srq); |
1555 | priv->cm.srq = NULL; | 1549 | priv->cm.srq = NULL; |
1556 | return; | 1550 | return; |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index be11d5d5b8c1..43cf8b8a8d2e 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -418,11 +418,8 @@ static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc) | |||
418 | "(status=%d, wrid=%d vend_err %x)\n", | 418 | "(status=%d, wrid=%d vend_err %x)\n", |
419 | wc->status, wr_id, wc->vendor_err); | 419 | wc->status, wr_id, wc->vendor_err); |
420 | qp_work = kzalloc(sizeof(*qp_work), GFP_ATOMIC); | 420 | qp_work = kzalloc(sizeof(*qp_work), GFP_ATOMIC); |
421 | if (!qp_work) { | 421 | if (!qp_work) |
422 | ipoib_warn(priv, "%s Failed alloc ipoib_qp_state_validate for qp: 0x%x\n", | ||
423 | __func__, priv->qp->qp_num); | ||
424 | return; | 422 | return; |
425 | } | ||
426 | 423 | ||
427 | INIT_WORK(&qp_work->work, ipoib_qp_state_validate_work); | 424 | INIT_WORK(&qp_work->work, ipoib_qp_state_validate_work); |
428 | qp_work->priv = priv; | 425 | qp_work->priv = priv; |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 5636fc3da6b8..423b30dfe2d8 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -1594,11 +1594,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port) | |||
1594 | /* Allocate RX/TX "rings" to hold queued skbs */ | 1594 | /* Allocate RX/TX "rings" to hold queued skbs */ |
1595 | priv->rx_ring = kzalloc(ipoib_recvq_size * sizeof *priv->rx_ring, | 1595 | priv->rx_ring = kzalloc(ipoib_recvq_size * sizeof *priv->rx_ring, |
1596 | GFP_KERNEL); | 1596 | GFP_KERNEL); |
1597 | if (!priv->rx_ring) { | 1597 | if (!priv->rx_ring) |
1598 | printk(KERN_WARNING "%s: failed to allocate RX ring (%d entries)\n", | ||
1599 | ca->name, ipoib_recvq_size); | ||
1600 | goto out; | 1598 | goto out; |
1601 | } | ||
1602 | 1599 | ||
1603 | priv->tx_ring = vzalloc(ipoib_sendq_size * sizeof *priv->tx_ring); | 1600 | priv->tx_ring = vzalloc(ipoib_sendq_size * sizeof *priv->tx_ring); |
1604 | if (!priv->tx_ring) { | 1601 | if (!priv->tx_ring) { |