Skip to content

Commit

Permalink
hw/block/nvme: fix warning about legacy namespace configuration
Browse files Browse the repository at this point in the history
Remove the unused BlockConf from the controller structure and remove the
noop constraint checking.

Device works just fine with both legacy drive parameter namespace and
nvme-ns namespace definitions.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
  • Loading branch information
birkelund committed Apr 7, 2021
1 parent dae8be3 commit f447f92
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions hw/block/nvme.c
Expand Up @@ -5805,11 +5805,6 @@ static void nvme_check_constraints(NvmeCtrl *n, Error **errp)
params->max_ioqpairs = params->num_queues - 1;
}

if (n->conf.blk) {
warn_report("drive property is deprecated; "
"please use an nvme-ns device instead");
}

if (params->max_ioqpairs < 1 ||
params->max_ioqpairs > NVME_MAX_IOQPAIRS) {
error_setg(errp, "max_ioqpairs must be between 1 and %d",
Expand Down
1 change: 0 additions & 1 deletion hw/block/nvme.h
Expand Up @@ -166,7 +166,6 @@ typedef struct NvmeCtrl {
NvmeBar bar;
NvmeParams params;
NvmeBus bus;
BlockConf conf;

uint16_t cntlid;
bool qs_created;
Expand Down

0 comments on commit f447f92

Please sign in to comment.