bdev/nvme: remove bdev_nvme_populate_namespaces
This function can now be easily moved inline to its single caller. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I55a20dfb9f6cdeee2541b02b63fd5422786c551c Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475925 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
0cdcf62a65
commit
ed35ca1de1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user