Skip to contentSkip to conversation

nvme/lightnvm: add missing endianess conversion in nvme_nvm_end_io

PATCH New Christoph Hellwig 3 participants 4 messages Apr 21, 2017 – Apr 25, 2017

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 nvme/lightnvm: add missing endianess conversion in nvme_nvm_end_io

Found by sparse.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/lightnvm.c +1 -1
index de61a4a03d78..e4e4e60b1224 100644
@@ -483,7 +483,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
 {
 	struct nvm_rq *rqd = rq->end_io_data;
 
-	rqd->ppa_status = nvme_req(rq)->result.u64;
+	rqd->ppa_status = le64_to_cpu(nvme_req(rq)->result.u64);
 	rqd->error = nvme_req(rq)->status;
 	nvm_end_io(rqd);
 
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 1/1 nvme/lightnvm: add missing endianess conversion in nvme_nvm_end_io

Javier, Matias: can I get a quick ACK? This is the last patch needed to make drivers/nvme warning-free.

Quoted 28 lines · Christoph Hellwig

Found by sparse.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/lightnvm.c +1 -1
index de61a4a03d78..e4e4e60b1224 100644
@@ -483,7 +483,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
 {
 	struct nvm_rq *rqd = rq->end_io_data;
 
-	rqd->ppa_status = nvme_req(rq)->result.u64;
+	rqd->ppa_status = le64_to_cpu(nvme_req(rq)->result.u64);
 	rqd->error = nvme_req(rq)->status;
 	nvm_end_io(rqd);
 
Signature · 7 lines
2.11.0


_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

---end quoted text---

#2 lore raw

PATCH 1/1 nvme/lightnvm: add missing endianess conversion in nvme_nvm_end_io

Quoted 4 lines · Christoph Hellwig

Javier, Matias: can I get a quick ACK? This is the last patch needed to make drivers/nvme warning-free.

Looks good to me. Sorry for the delay.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20170425/5c2f3f50/attachment-0001.sig>

Reviewed-by on v1 1/1
#3 lore raw
In reply to Christoph Hellwig

________________________________________
From: Christoph Hellwig <[email protected]>
Sent: 25 April 2017 09:41
To: Javier Gonzalez; Matias Bj?rling
Cc: linux-nvme at lists.infradead.org
Subject: Re: [PATCH] nvme/lightnvm: add missing endianess conversion in nvme_nvm_end_io

Javier, Matias: can I get a quick ACK? This is the last patch needed to make drivers/nvme warning-free.

Quoted 24 lines · Christoph Hellwig

Found by sparse.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/lightnvm.c +1 -2
index de61a4a03d78..e4e4e60b1224 100644
@@ -483,7 +483,7 @@ static void nvme_nvm_end_io(struct request *rq, int error)
 {
      struct nvm_rq *rqd = rq->end_io_data;
 
-     rqd->ppa_status = nvme_req(rq)->result.u64;
+     rqd->ppa_status = le64_to_cpu(nvme_req(rq)->result.u64);
      rqd->error = nvme_req(rq)->status;
      nvm_end_io(rqd);
 
--

2.11.0

Quoted 4 lines

_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

Thanks Christoph.

Reviewed-by Matias Bj?rling <matias at cnexlabs.com>