All of lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/4] nvme: add missing byte swap in nvme_setup_discard
Date: Fri, 31 Mar 2017 17:00:05 +0200	[thread overview]
Message-ID: <20170331150008.16034-2-hch@lst.de> (raw)
In-Reply-To: <20170331150008.16034-1-hch@lst.de>

Fixes: b35ba01e ("nvme: support ranged discard requests")
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 9b3b57fef446..9583a5f58a1d 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -270,7 +270,7 @@ static inline int nvme_setup_discard(struct nvme_ns *ns, struct request *req,
 	memset(cmnd, 0, sizeof(*cmnd));
 	cmnd->dsm.opcode = nvme_cmd_dsm;
 	cmnd->dsm.nsid = cpu_to_le32(ns->ns_id);
-	cmnd->dsm.nr = segments - 1;
+	cmnd->dsm.nr = cpu_to_le32(segments - 1);
 	cmnd->dsm.attributes = cpu_to_le32(NVME_DSMGMT_AD);
 
 	req->special_vec.bv_page = virt_to_page(range);
-- 
2.11.0

  reply	other threads:[~2017-03-31 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 15:00 trivial nvme fixes for 4.11 Christoph Hellwig
2017-03-31 15:00 ` Christoph Hellwig [this message]
2017-03-31 15:00 ` [PATCH 2/4] nvmet: add missing byte swap in nvmet_get_smart_log Christoph Hellwig
2017-03-31 15:00 ` [PATCH 3/4] nvmet: fix byte swap in nvmet_execute_write_zeroes Christoph Hellwig
2017-03-31 15:00 ` [PATCH 4/4] nvmet: fix byte swap in nvmet_parse_io_cmd Christoph Hellwig
2017-04-02  8:14 ` trivial nvme fixes for 4.11 Max Gurtovoy

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=20170331150008.16034-2-hch@lst.de \
    --to=hch@lst.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.