From ddda03ef643000404f48e802b26d17a8acadfb80 Mon Sep 17 00:00:00 2001 From: Piotr Pelplinski Date: Mon, 15 Oct 2018 11:23:24 +0200 Subject: [PATCH] ctrlr_bdev: change spdk_nvmf_bdev_ctrlr_identify_ns to return void This function doesn't return error code Signed-off-by: Piotr Pelplinski Change-Id: I67a8fa7393990470e509baa8934e78bc6f6a6c9e Reviewed-on: https://review.gerrithub.io/429441 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/nvmf/ctrlr.c | 4 +++- lib/nvmf/ctrlr_bdev.c | 4 +--- lib/nvmf/nvmf_internal.h | 2 +- test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index d66b2e6a52..d0703a1076 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -1164,7 +1164,9 @@ spdk_nvmf_ctrlr_identify_ns(struct spdk_nvmf_ctrlr *ctrlr, return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; } - return spdk_nvmf_bdev_ctrlr_identify_ns(ns, nsdata); + spdk_nvmf_bdev_ctrlr_identify_ns(ns, nsdata); + + return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; } static int diff --git a/lib/nvmf/ctrlr_bdev.c b/lib/nvmf/ctrlr_bdev.c index f1e5be3255..7eb4f19a38 100644 --- a/lib/nvmf/ctrlr_bdev.c +++ b/lib/nvmf/ctrlr_bdev.c @@ -102,7 +102,7 @@ nvmf_bdev_ctrlr_complete_cmd(struct spdk_bdev_io *bdev_io, bool success, spdk_bdev_free_io(bdev_io); } -int +void spdk_nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_data *nsdata) { struct spdk_bdev *bdev = ns->bdev; @@ -124,8 +124,6 @@ spdk_nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_da SPDK_STATIC_ASSERT(sizeof(nsdata->eui64) == sizeof(ns->opts.eui64), "size mismatch"); memcpy(&nsdata->eui64, ns->opts.eui64, sizeof(nsdata->eui64)); - - return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; } static void diff --git a/lib/nvmf/nvmf_internal.h b/lib/nvmf/nvmf_internal.h index 3f05e5a7cd..c505cf1507 100644 --- a/lib/nvmf/nvmf_internal.h +++ b/lib/nvmf/nvmf_internal.h @@ -288,7 +288,7 @@ bool spdk_nvmf_ctrlr_dsm_supported(struct spdk_nvmf_ctrlr *ctrlr); bool spdk_nvmf_ctrlr_write_zeroes_supported(struct spdk_nvmf_ctrlr *ctrlr); void spdk_nvmf_ctrlr_ns_changed(struct spdk_nvmf_ctrlr *ctrlr, uint32_t nsid); -int spdk_nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_data *nsdata); +void spdk_nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_data *nsdata); int spdk_nvmf_subsystem_add_ctrlr(struct spdk_nvmf_subsystem *subsystem, struct spdk_nvmf_ctrlr *ctrlr); diff --git a/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c b/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c index 42ceee287f..70ccc41b8b 100644 --- a/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c +++ b/test/unit/lib/nvmf/ctrlr.c/ctrlr_ut.c @@ -144,7 +144,7 @@ ctrlr_ut_pass_msg(spdk_thread_fn fn, void *ctx, void *thread_ctx) fn(ctx); } -int +void spdk_nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_data *nsdata) { uint64_t num_blocks; @@ -157,8 +157,6 @@ spdk_nvmf_bdev_ctrlr_identify_ns(struct spdk_nvmf_ns *ns, struct spdk_nvme_ns_da nsdata->nlbaf = 0; nsdata->flbas.format = 0; nsdata->lbaf[0].lbads = spdk_u32log2(512); - - return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; } static void