diff mbox series

[2/2] IB/isert: remove duplicated error prints

Message ID 20200805121231.166162-2-maxg@mellanox.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [1/2] IB/isert: use unlikely macro in the fast path | expand

Commit Message

Max Gurtovoy Aug. 5, 2020, 12:12 p.m. UTC
The isert_post_recv function prints an error in case of failures, so no
need for the callers to add another print.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

Comments

Sagi Grimberg Aug. 6, 2020, 8:12 p.m. UTC | #1
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Jason Gunthorpe Aug. 18, 2020, 6:41 p.m. UTC | #2
On Wed, Aug 05, 2020 at 03:12:31PM +0300, Max Gurtovoy wrote:
> The isert_post_recv function prints an error in case of failures, so no
> need for the callers to add another print.
> 
> Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
> Acked-by: Sagi Grimberg <sagi@grimberg.me>
> ---
>  drivers/infiniband/ulp/isert/ib_isert.c | 15 +++------------
>  1 file changed, 3 insertions(+), 12 deletions(-)

Applied to for-next

I dropped patch 1/1 about the unlikelys

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index c818eebe6538..58c2a6ca5a5e 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -1243,12 +1243,7 @@  isert_handle_iscsi_dataout(struct isert_conn *isert_conn,
 	 * multiple data-outs on the same command can arrive -
 	 * so post the buffer before hand
 	 */
-	rc = isert_post_recv(isert_conn, rx_desc);
-	if (rc) {
-		isert_err("ib_post_recv failed with %d\n", rc);
-		return rc;
-	}
-	return 0;
+	return isert_post_recv(isert_conn, rx_desc);
 }
 
 static int
@@ -1825,10 +1820,8 @@  isert_post_response(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd)
 	int ret;
 
 	ret = isert_post_recv(isert_conn, isert_cmd->rx_desc);
-	if (ret) {
-		isert_err("ib_post_recv failed with %d\n", ret);
+	if (ret)
 		return ret;
-	}
 
 	ret = ib_post_send(isert_conn->qp, &isert_cmd->tx_desc.send_wr, NULL);
 	if (unlikely(ret)) {
@@ -2200,10 +2193,8 @@  isert_put_datain(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
 				   &isert_cmd->tx_desc.send_wr);
 
 		rc = isert_post_recv(isert_conn, isert_cmd->rx_desc);
-		if (rc) {
-			isert_err("ib_post_recv failed with %d\n", rc);
+		if (rc)
 			return rc;
-		}
 
 		chain_wr = &isert_cmd->tx_desc.send_wr;
 	}