From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>, "Thomas Huth" <thuth@redhat.com>,
qemu-block@nongnu.org, "Klaus Jensen" <k.jensen@samsung.com>,
"Max Reitz" <mreitz@redhat.com>,
"Keith Busch" <kbusch@kernel.org>,
"Klaus Jensen" <its@irrelevant.dk>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 03/14] hw/block/nvme: rename __nvme_select_ns_iocs
Date: Mon, 19 Apr 2021 21:27:50 +0200 [thread overview]
Message-ID: <20210419192801.62255-4-its@irrelevant.dk> (raw)
In-Reply-To: <20210419192801.62255-1-its@irrelevant.dk>
From: Klaus Jensen <k.jensen@samsung.com>
Get rid of the (reserved) double underscore use.
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
hw/block/nvme.c | 47 +++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index d1b94e36c6fb..f8209a92302b 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -4916,7 +4916,25 @@ static void nvme_update_dmrsl(NvmeCtrl *n)
}
}
-static void __nvme_select_ns_iocs(NvmeCtrl *n, NvmeNamespace *ns);
+static void nvme_select_iocs_ns(NvmeCtrl *n, NvmeNamespace *ns)
+{
+ ns->iocs = nvme_cse_iocs_none;
+ switch (ns->csi) {
+ case NVME_CSI_NVM:
+ if (NVME_CC_CSS(n->bar.cc) != NVME_CC_CSS_ADMIN_ONLY) {
+ ns->iocs = nvme_cse_iocs_nvm;
+ }
+ break;
+ case NVME_CSI_ZONED:
+ if (NVME_CC_CSS(n->bar.cc) == NVME_CC_CSS_CSI) {
+ ns->iocs = nvme_cse_iocs_zoned;
+ } else if (NVME_CC_CSS(n->bar.cc) == NVME_CC_CSS_NVM) {
+ ns->iocs = nvme_cse_iocs_nvm;
+ }
+ break;
+ }
+}
+
static uint16_t nvme_ns_attachment(NvmeCtrl *n, NvmeRequest *req)
{
NvmeNamespace *ns;
@@ -4967,7 +4985,7 @@ static uint16_t nvme_ns_attachment(NvmeCtrl *n, NvmeRequest *req)
}
nvme_attach_ns(ctrl, ns);
- __nvme_select_ns_iocs(ctrl, ns);
+ nvme_select_iocs_ns(ctrl, ns);
} else {
if (!nvme_ns(ctrl, nsid)) {
return NVME_NS_NOT_ATTACHED | NVME_DNR;
@@ -5268,26 +5286,7 @@ static void nvme_ctrl_shutdown(NvmeCtrl *n)
}
}
-static void __nvme_select_ns_iocs(NvmeCtrl *n, NvmeNamespace *ns)
-{
- ns->iocs = nvme_cse_iocs_none;
- switch (ns->csi) {
- case NVME_CSI_NVM:
- if (NVME_CC_CSS(n->bar.cc) != NVME_CC_CSS_ADMIN_ONLY) {
- ns->iocs = nvme_cse_iocs_nvm;
- }
- break;
- case NVME_CSI_ZONED:
- if (NVME_CC_CSS(n->bar.cc) == NVME_CC_CSS_CSI) {
- ns->iocs = nvme_cse_iocs_zoned;
- } else if (NVME_CC_CSS(n->bar.cc) == NVME_CC_CSS_NVM) {
- ns->iocs = nvme_cse_iocs_nvm;
- }
- break;
- }
-}
-
-static void nvme_select_ns_iocs(NvmeCtrl *n)
+static void nvme_select_iocs(NvmeCtrl *n)
{
NvmeNamespace *ns;
int i;
@@ -5298,7 +5297,7 @@ static void nvme_select_ns_iocs(NvmeCtrl *n)
continue;
}
- __nvme_select_ns_iocs(n, ns);
+ nvme_select_iocs_ns(n, ns);
}
}
@@ -5400,7 +5399,7 @@ static int nvme_start_ctrl(NvmeCtrl *n)
QTAILQ_INIT(&n->aer_queue);
- nvme_select_ns_iocs(n);
+ nvme_select_iocs(n);
return 0;
}
--
2.31.1
next prev parent reply other threads:[~2021-04-19 20:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 19:27 [PATCH 00/14] hw(/block/)nvme: spring cleaning Klaus Jensen
2021-04-19 19:27 ` [PATCH 01/14] hw/block/nvme: rename __nvme_zrm_open Klaus Jensen
2021-04-20 5:53 ` Thomas Huth
2021-04-20 7:16 ` Klaus Jensen
2021-04-19 19:27 ` [PATCH 02/14] hw/block/nvme: rename __nvme_advance_zone_wp Klaus Jensen
2021-04-20 5:53 ` Thomas Huth
2021-04-19 19:27 ` Klaus Jensen [this message]
2021-04-20 5:56 ` [PATCH 03/14] hw/block/nvme: rename __nvme_select_ns_iocs Thomas Huth
2021-04-19 19:27 ` [PATCH 04/14] hw/block/nvme: consolidate header files Klaus Jensen
2021-04-19 19:27 ` [PATCH 05/14] hw/block/nvme: cleanup includes Klaus Jensen
2021-04-19 19:27 ` [PATCH 06/14] hw/block/nvme: remove non-shared defines from header file Klaus Jensen
2021-04-19 19:27 ` [PATCH 07/14] hw/block/nvme: replace nvme_ns_status Klaus Jensen
2021-04-19 19:27 ` [PATCH 08/14] hw/block/nvme: cache lba and ms sizes Klaus Jensen
2021-04-19 19:27 ` [PATCH 09/14] hw/block/nvme: add metadata offset helper Klaus Jensen
2021-04-19 19:27 ` [PATCH 10/14] hw/block/nvme: streamline namespace array indexing Klaus Jensen
2021-04-19 19:27 ` [PATCH 11/14] hw/block/nvme: remove num_namespaces member Klaus Jensen
2021-04-19 19:27 ` [PATCH 12/14] hw/block/nvme: remove irrelevant zone resource checks Klaus Jensen
2021-04-19 19:28 ` [PATCH 13/14] hw/block/nvme: move zoned constraints checks Klaus Jensen
2021-04-19 19:28 ` [PATCH 14/14] hw/nvme: move nvme emulation out of hw/block Klaus Jensen
2021-04-21 18:04 ` Klaus Jensen
2021-04-20 17:22 ` [PATCH 00/14] hw(/block/)nvme: spring cleaning Keith Busch
2021-04-26 8:02 ` Klaus Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210419192801.62255-4-its@irrelevant.dk \
--to=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).