Commit ed35ca1d authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

bdev/nvme: remove bdev_nvme_populate_namespaces



This function can now be easily moved inline to
its single caller.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I55a20dfb9f6cdeee2541b02b63fd5422786c551c

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475925


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 0cdcf62a
Loading
Loading
Loading
Loading
+5 −12
Original line number Diff line number Diff line
@@ -1425,22 +1425,12 @@ nvme_ctrlr_populate_namespaces_done(struct nvme_async_probe_ctx *ctx)
	populate_namespaces_cb(ctx, j, 0);
}

static void
bdev_nvme_populate_namespaces(struct nvme_async_probe_ctx *ctx)
{
	struct nvme_bdev_ctrlr	*nvme_bdev_ctrlr;

	nvme_bdev_ctrlr = nvme_bdev_ctrlr_get(&ctx->trid);
	assert(nvme_bdev_ctrlr != NULL);

	nvme_ctrlr_populate_namespaces(nvme_bdev_ctrlr, ctx);
}

static void
connect_attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
		  struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts)
{
	struct spdk_nvme_ctrlr_opts *user_opts = cb_ctx;
	struct nvme_bdev_ctrlr	*nvme_bdev_ctrlr;
	struct nvme_async_probe_ctx *ctx;
	int rc;

@@ -1455,7 +1445,10 @@ connect_attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
		return;
	}

	bdev_nvme_populate_namespaces(ctx);
	nvme_bdev_ctrlr = nvme_bdev_ctrlr_get(&ctx->trid);
	assert(nvme_bdev_ctrlr != NULL);

	nvme_ctrlr_populate_namespaces(nvme_bdev_ctrlr, ctx);
}

static int