From 0c1003e9835c998e19cc52e46f2c45194562a4ea Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Fri, 9 Mar 2018 01:16:21 +0800 Subject: [PATCH] lib/iscsi: change type of spdk_iscsi_send_nopin to void Change-Id: Ie7a940efde885dbf0bb7c085fd17c3991dfa3341 Signed-off-by: Ziye Yang Reviewed-on: https://review.gerrithub.io/403165 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- lib/iscsi/iscsi.c | 6 ++---- lib/iscsi/iscsi.h | 2 +- test/unit/lib/iscsi/conn.c/conn_ut.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 23c62337c..ae0dc3a53 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -4271,7 +4271,7 @@ spdk_iscsi_send_r2t(struct spdk_iscsi_conn *conn, return SPDK_SUCCESS; } -int spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn) +void spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn) { struct spdk_iscsi_pdu *rsp_pdu; struct iscsi_bhs_nop_in *rsp; @@ -4280,7 +4280,7 @@ int spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn) if (conn->sess == NULL || !conn->full_feature || !spdk_iscsi_param_eq_val(conn->sess->params, "SessionType", "Normal")) { - return SPDK_SUCCESS; + return; } SPDK_DEBUGLOG(SPDK_LOG_ISCSI, @@ -4313,8 +4313,6 @@ int spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn) spdk_iscsi_conn_write_pdu(conn, rsp_pdu); conn->nop_outstanding = true; - - return SPDK_SUCCESS; } static void diff --git a/lib/iscsi/iscsi.h b/lib/iscsi/iscsi.h index 2d02e8d42..8ec6bbe30 100644 --- a/lib/iscsi/iscsi.h +++ b/lib/iscsi/iscsi.h @@ -335,7 +335,7 @@ void spdk_iscsi_fini(spdk_iscsi_fini_cb cb_fn, void *cb_arg); void spdk_shutdown_iscsi_conns_done(void); void spdk_iscsi_config_text(FILE *fp); -int spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn); +void spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn); void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task); int spdk_iscsi_execute(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu); diff --git a/test/unit/lib/iscsi/conn.c/conn_ut.c b/test/unit/lib/iscsi/conn.c/conn_ut.c index 1588b11bc..988376abc 100644 --- a/test/unit/lib/iscsi/conn.c/conn_ut.c +++ b/test/unit/lib/iscsi/conn.c/conn_ut.c @@ -218,9 +218,8 @@ spdk_iscsi_task_mgmt_response(struct spdk_iscsi_conn *conn, { } -int spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn) +void spdk_iscsi_send_nopin(struct spdk_iscsi_conn *conn) { - return 0; } int