ut/iscsi: Use TAILQ_HEAD_INITIALIZER() for g_write_pdu_list

This clarifies that g_write_pdu_list is global.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4292a2fb455f3a47d79ae6ebb5dc6046f0f7dd52
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471951
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-10-22 09:52:30 +09:00 committed by Tomasz Zawadzki
parent 22f4e0a12f
commit 933d990e23
2 changed files with 1 additions and 11 deletions

View File

@ -14,7 +14,7 @@
SPDK_LOG_REGISTER_COMPONENT("iscsi", SPDK_LOG_ISCSI)
TAILQ_HEAD(, spdk_iscsi_pdu) g_write_pdu_list;
TAILQ_HEAD(, spdk_iscsi_pdu) g_write_pdu_list = TAILQ_HEAD_INITIALIZER(g_write_pdu_list);
struct spdk_iscsi_task *
spdk_iscsi_task_get(struct spdk_iscsi_conn *conn,

View File

@ -282,8 +282,6 @@ maxburstlength_test(void)
TAILQ_INIT(&conn.write_pdu_list);
TAILQ_INIT(&conn.active_r2t_tasks);
TAILQ_INIT(&g_write_pdu_list);
req_pdu->bhs.opcode = ISCSI_OP_SCSI;
req_pdu->data_segment_len = 0;
@ -354,8 +352,6 @@ underflow_for_read_transfer_test(void)
struct iscsi_bhs_data_in *datah;
uint32_t residual_count = 0;
TAILQ_INIT(&g_write_pdu_list);
memset(&sess, 0, sizeof(sess));
memset(&conn, 0, sizeof(conn));
memset(&task, 0, sizeof(task));
@ -418,8 +414,6 @@ underflow_for_zero_read_transfer_test(void)
struct iscsi_bhs_scsi_resp *resph;
uint32_t residual_count = 0, data_segment_len;
TAILQ_INIT(&g_write_pdu_list);
memset(&sess, 0, sizeof(sess));
memset(&conn, 0, sizeof(conn));
memset(&task, 0, sizeof(task));
@ -484,8 +478,6 @@ underflow_for_request_sense_test(void)
struct iscsi_bhs_scsi_resp *resph;
uint32_t residual_count = 0, data_segment_len;
TAILQ_INIT(&g_write_pdu_list);
memset(&sess, 0, sizeof(sess));
memset(&conn, 0, sizeof(conn));
memset(&task, 0, sizeof(task));
@ -575,8 +567,6 @@ underflow_for_check_condition_test(void)
struct iscsi_bhs_scsi_resp *resph;
uint32_t data_segment_len;
TAILQ_INIT(&g_write_pdu_list);
memset(&sess, 0, sizeof(sess));
memset(&conn, 0, sizeof(conn));
memset(&task, 0, sizeof(task));