qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@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 v8 1/5] hw/block/nvme: remove superfluous NvmeCtrl parameter
Date: Thu, 12 Nov 2020 20:59:41 +0100	[thread overview]
Message-ID: <20201112195945.819915-2-its@irrelevant.dk> (raw)
In-Reply-To: <20201112195945.819915-1-its@irrelevant.dk>

From: Klaus Jensen <k.jensen@samsung.com>

nvme_check_bounds has no use of the NvmeCtrl parameter; remove it.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
 hw/block/nvme.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 01b657b1c5e2..51f35e8cf18b 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -866,8 +866,8 @@ static inline uint16_t nvme_check_mdts(NvmeCtrl *n, size_t len)
     return NVME_SUCCESS;
 }
 
-static inline uint16_t nvme_check_bounds(NvmeCtrl *n, NvmeNamespace *ns,
-                                         uint64_t slba, uint32_t nlb)
+static inline uint16_t nvme_check_bounds(NvmeNamespace *ns, uint64_t slba,
+                                         uint32_t nlb)
 {
     uint64_t nsze = le64_to_cpu(ns->id_ns.nsze);
 
@@ -943,7 +943,7 @@ static uint16_t nvme_write_zeroes(NvmeCtrl *n, NvmeRequest *req)
 
     trace_pci_nvme_write_zeroes(nvme_cid(req), nvme_nsid(ns), slba, nlb);
 
-    status = nvme_check_bounds(n, ns, slba, nlb);
+    status = nvme_check_bounds(ns, slba, nlb);
     if (status) {
         trace_pci_nvme_err_invalid_lba_range(slba, nlb, ns->id_ns.nsze);
         return status;
@@ -979,7 +979,7 @@ static uint16_t nvme_rw(NvmeCtrl *n, NvmeRequest *req)
         goto invalid;
     }
 
-    status = nvme_check_bounds(n, ns, slba, nlb);
+    status = nvme_check_bounds(ns, slba, nlb);
     if (status) {
         trace_pci_nvme_err_invalid_lba_range(slba, nlb, ns->id_ns.nsze);
         goto invalid;
-- 
2.29.2



  reply	other threads:[~2020-11-12 20:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 19:59 [PATCH v8 0/5] hw/block/nvme: dulbe and dsm support Klaus Jensen
2020-11-12 19:59 ` Klaus Jensen [this message]
2020-11-16 11:29   ` [PATCH v8 1/5] hw/block/nvme: remove superfluous NvmeCtrl parameter Minwoo Im
2020-11-12 19:59 ` [PATCH v8 2/5] hw/block/nvme: pull aio error handling Klaus Jensen
2020-11-16 11:36   ` Minwoo Im
2020-11-16 11:52     ` Klaus Jensen
2020-11-16 17:57   ` Keith Busch
2020-11-16 18:18     ` Klaus Jensen
2020-11-17  7:16       ` Klaus Jensen
2020-11-12 19:59 ` [PATCH v8 3/5] hw/block/nvme: add dulbe support Klaus Jensen
2020-11-16 11:43   ` Minwoo Im
2020-11-16 11:57     ` Klaus Jensen
2020-11-16 18:00   ` Keith Busch
2020-11-12 19:59 ` [PATCH v8 4/5] nvme: add namespace I/O optimization fields to shared header Klaus Jensen
2020-11-16 11:47   ` Minwoo Im
2020-11-12 19:59 ` [PATCH v8 5/5] hw/block/nvme: add the dataset management command Klaus Jensen
2020-11-16 18:01   ` Keith Busch
2020-11-23 20:45 ` [PATCH v8 0/5] hw/block/nvme: dulbe and dsm support 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=20201112195945.819915-2-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 \
    /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).