From: Klaus Jensen <its@irrelevant.dk>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
qemu-block@nongnu.org, "Klaus Jensen" <k.jensen@samsung.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Klaus Jensen" <its@irrelevant.dk>,
"Hanna Reitz" <hreitz@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Keith Busch" <kbusch@kernel.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PULL 2/6] hw/nvme/ctrl: Have nvme_addr_write() take const buffer
Date: Mon, 14 Feb 2022 09:07:57 +0100 [thread overview]
Message-ID: <20220214080801.13627-3-its@irrelevant.dk> (raw)
In-Reply-To: <20220214080801.13627-1-its@irrelevant.dk>
From: Philippe Mathieu-Daudé <philmd@redhat.com>
The 'buf' argument is not modified, so better pass it as const type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
hw/nvme/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 37681a975986..12e1fcda7c85 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -395,7 +395,7 @@ static int nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size)
return pci_dma_read(&n->parent_obj, addr, buf, size);
}
-static int nvme_addr_write(NvmeCtrl *n, hwaddr addr, void *buf, int size)
+static int nvme_addr_write(NvmeCtrl *n, hwaddr addr, const void *buf, int size)
{
hwaddr hi = addr + size - 1;
if (hi < addr) {
--
2.35.1
next prev parent reply other threads:[~2022-02-14 8:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 8:07 [PULL 0/6] hw/nvme updates Klaus Jensen
2022-02-14 8:07 ` [PULL 1/6] hw/nvme: fix CVE-2021-3929 Klaus Jensen
2022-02-14 8:07 ` Klaus Jensen [this message]
2022-02-14 8:07 ` [PULL 3/6] hw/nvme/ctrl: Pass buffers as 'void *' types Klaus Jensen
2022-02-14 8:07 ` [PULL 4/6] hw/nvme: add struct for zone management send Klaus Jensen
2022-02-14 8:08 ` [PULL 5/6] hw/nvme: add ozcs enum Klaus Jensen
2022-02-14 8:08 ` [PULL 6/6] hw/nvme: add support for zoned random write area Klaus Jensen
2022-02-15 19:30 ` [PULL 0/6] hw/nvme updates Peter Maydell
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=20220214080801.13627-3-its@irrelevant.dk \
--to=its@irrelevant.dk \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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).