summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinwoo Im2021-01-17 15:53:35 +0100
committerKlaus Jensen2021-02-08 21:15:53 +0100
commit24ec776a5ac70954e95a33249d8fe3378c01f3a0 (patch)
treeea1bf3a63ba28db4a17d7aa7f20381887d96d562
parenthw/block/nvme: split setup and register for namespace (diff)
downloadqemu-24ec776a5ac70954e95a33249d8fe3378c01f3a0.tar.gz
qemu-24ec776a5ac70954e95a33249d8fe3378c01f3a0.tar.xz
qemu-24ec776a5ac70954e95a33249d8fe3378c01f3a0.zip
hw/block/nvme: remove unused argument in nvme_ns_setup
nvme_ns_setup() finally does not have nothing to do with NvmeCtrl instance. Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
-rw-r--r--hw/block/nvme-ns.c4
-rw-r--r--hw/block/nvme-ns.h2
-rw-r--r--hw/block/nvme.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c
index ce79ad4a53..3f52acb89c 100644
--- a/hw/block/nvme-ns.c
+++ b/hw/block/nvme-ns.c
@@ -301,7 +301,7 @@ static int nvme_ns_check_constraints(NvmeNamespace *ns, Error **errp)
return 0;
}
-int nvme_ns_setup(NvmeCtrl *n, NvmeNamespace *ns, Error **errp)
+int nvme_ns_setup(NvmeNamespace *ns, Error **errp)
{
if (nvme_ns_check_constraints(ns, errp)) {
return -1;
@@ -353,7 +353,7 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp)
NvmeCtrl *n = NVME(s->parent);
Error *local_err = NULL;
- if (nvme_ns_setup(n, ns, &local_err)) {
+ if (nvme_ns_setup(ns, &local_err)) {
error_propagate_prepend(errp, local_err,
"could not setup namespace: ");
return;
diff --git a/hw/block/nvme-ns.h b/hw/block/nvme-ns.h
index a0baa5f6d4..293ac990e3 100644
--- a/hw/block/nvme-ns.h
+++ b/hw/block/nvme-ns.h
@@ -174,7 +174,7 @@ static inline void nvme_aor_dec_active(NvmeNamespace *ns)
assert(ns->nr_active_zones >= 0);
}
-int nvme_ns_setup(NvmeCtrl *n, NvmeNamespace *ns, Error **errp);
+int nvme_ns_setup(NvmeNamespace *ns, Error **errp);
void nvme_ns_drain(NvmeNamespace *ns);
void nvme_ns_shutdown(NvmeNamespace *ns);
void nvme_ns_cleanup(NvmeNamespace *ns);
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 0b002cb2be..30bd70fd5b 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -4377,7 +4377,7 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp)
ns = &n->namespace;
ns->params.nsid = 1;
- if (nvme_ns_setup(n, ns, errp)) {
+ if (nvme_ns_setup(ns, errp)) {
return;
}
}