From 355604bfb05430c076c04982417284ee0110627d Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 4 Oct 2021 23:16:21 +0000 Subject: [PATCH] nvme_fuzz: simplify register_ns() We can just always do the TAILQ_INITs for admin related TAILQs. Also no need to set anything to NULL since the buffer was allocated using calloc. Signed-off-by: Jim Harris Change-Id: Ifbbda0436e7f33e225cf14dbd103779080b106da Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9729 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Changpeng Liu --- test/app/fuzz/nvme_fuzz/nvme_fuzz.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/app/fuzz/nvme_fuzz/nvme_fuzz.c b/test/app/fuzz/nvme_fuzz/nvme_fuzz.c index c75ce63796..c5c26fb14d 100644 --- a/test/app/fuzz/nvme_fuzz/nvme_fuzz.c +++ b/test/app/fuzz/nvme_fuzz/nvme_fuzz.c @@ -580,11 +580,8 @@ register_ns(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_ns *ns, uint32_t nsi TAILQ_INIT(&ns_entry->io_qp.free_ctx_objs); TAILQ_INIT(&ns_entry->io_qp.outstanding_ctx_objs); - if (g_run_admin_commands) { - ns_entry->a_qp.qpair = NULL; - TAILQ_INIT(&ns_entry->a_qp.free_ctx_objs); - TAILQ_INIT(&ns_entry->a_qp.outstanding_ctx_objs); - } + TAILQ_INIT(&ns_entry->a_qp.free_ctx_objs); + TAILQ_INIT(&ns_entry->a_qp.outstanding_ctx_objs); TAILQ_INSERT_TAIL(&g_ns_list, ns_entry, tailq); }