From 72b4cda87f02d23e3d8cf31381b6ea4585c7a473 Mon Sep 17 00:00:00 2001 From: Cunyin Chang Date: Tue, 11 Oct 2016 08:29:10 +0800 Subject: [PATCH] bdev: remove unused field in data struct nvme_bdf_whitelist Change-Id: Ib21ef75515277d84cb12cdb6733137cbbe2e4ebc Signed-off-by: Cunyin Chang --- doc/iscsi/getting_started.txt | 6 +++--- lib/bdev/nvme/blockdev_nvme.c | 9 --------- lib/bdev/nvme/blockdev_nvme.h | 2 -- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/doc/iscsi/getting_started.txt b/doc/iscsi/getting_started.txt index 71f7e701b..97707ba81 100644 --- a/doc/iscsi/getting_started.txt +++ b/doc/iscsi/getting_started.txt @@ -145,9 +145,9 @@ the kernel to avoid interrupts and context switching. # is referenced later in the Subsystem section. # # Alternatively, the user can specify ClaimAllDevices. All - # NVMe devices will be claimed and named Nvme0, Nvme1, etc. - BDF 0000:00:00.0 Nvme0 - BDF 0000:01:00.0 Nvme1 + # NVMe devices will be claimed. + BDF 0000:00:00.0 + BDF 0000:01:00.0 # SPDK supports partitioning each nvme card into multiple LUNs # through the NvmeLunsPerNs parameter. If NvmeLunsPerNs is specified, diff --git a/lib/bdev/nvme/blockdev_nvme.c b/lib/bdev/nvme/blockdev_nvme.c index 21fcddbe5..39918bc24 100644 --- a/lib/bdev/nvme/blockdev_nvme.c +++ b/lib/bdev/nvme/blockdev_nvme.c @@ -475,15 +475,6 @@ nvme_library_init(void) probe_ctx.whitelist[probe_ctx.num_whitelist_controllers].dev = dev; probe_ctx.whitelist[probe_ctx.num_whitelist_controllers].func = func; - val = spdk_conf_section_get_nmval(sp, "BDF", i, 1); - if (val == NULL) { - SPDK_ERRLOG("BDF section with no device name\n"); - return -1; - } - - snprintf(probe_ctx.whitelist[probe_ctx.num_whitelist_controllers].name, MAX_NVME_NAME_LENGTH, "%s", - val); - probe_ctx.num_whitelist_controllers++; } } diff --git a/lib/bdev/nvme/blockdev_nvme.h b/lib/bdev/nvme/blockdev_nvme.h index ea937398f..fd0a7e7a2 100644 --- a/lib/bdev/nvme/blockdev_nvme.h +++ b/lib/bdev/nvme/blockdev_nvme.h @@ -36,7 +36,6 @@ #include -#define MAX_NVME_NAME_LENGTH 64 #define NVME_MAX_CONTROLLERS 16 struct nvme_bdf_whitelist { @@ -44,7 +43,6 @@ struct nvme_bdf_whitelist { uint8_t bus; uint8_t dev; uint8_t func; - char name[MAX_NVME_NAME_LENGTH]; }; struct nvme_probe_ctx {