From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/3] nvmet-tcp: fix endianess annotations
Date: Thu, 13 Dec 2018 09:51:06 +0100 [thread overview]
Message-ID: <20181213085107.17183-3-hch@lst.de> (raw)
In-Reply-To: <20181213085107.17183-1-hch@lst.de>
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/nvme/host/tcp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 15543358e245..5b64051671ca 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -35,7 +35,7 @@ struct nvme_tcp_request {
u32 pdu_sent;
u16 ttag;
struct list_head entry;
- u32 ddgst;
+ __le32 ddgst;
struct bio *curr_bio;
struct iov_iter iter;
@@ -272,7 +272,8 @@ nvme_tcp_fetch_request(struct nvme_tcp_queue *queue)
return req;
}
-static inline void nvme_tcp_ddgst_final(struct ahash_request *hash, u32 *dgst)
+static inline void nvme_tcp_ddgst_final(struct ahash_request *hash,
+ __le32 *dgst)
{
ahash_request_set_crypt(hash, NULL, (u8 *)dgst, 0);
crypto_ahash_final(hash);
@@ -817,7 +818,7 @@ static void nvme_tcp_fail_request(struct nvme_tcp_request *req)
union nvme_result res = {};
nvme_end_request(blk_mq_rq_from_pdu(req),
- NVME_SC_DATA_XFER_ERROR, res);
+ cpu_to_le16(NVME_SC_DATA_XFER_ERROR), res);
}
static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
@@ -1950,7 +1951,7 @@ nvme_tcp_timeout(struct request *rq, bool reserved)
union nvme_result res = {};
nvme_req(rq)->flags |= NVME_REQ_CANCELLED;
- nvme_end_request(rq, NVME_SC_ABORT_REQ, res);
+ nvme_end_request(rq, cpu_to_le16(NVME_SC_ABORT_REQ), res);
return BLK_EH_DONE;
}
--
2.19.2
next prev parent reply other threads:[~2018-12-13 8:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 8:51 sparse fixes Christoph Hellwig
2018-12-13 8:51 ` [PATCH 1/3] nvmet-tcp: fix endianess annotations Christoph Hellwig
2018-12-13 16:42 ` Sagi Grimberg
2018-12-13 20:10 ` Christoph Hellwig
2018-12-16 16:24 ` Christoph Hellwig
2018-12-18 7:24 ` Sagi Grimberg
2018-12-13 8:51 ` Christoph Hellwig [this message]
2018-12-13 16:42 ` [PATCH 2/3] " Sagi Grimberg
2018-12-13 8:51 ` [PATCH 3/3] nvme-pci: refactor nvme_poll_irqdisable to make sparse happy Christoph Hellwig
2018-12-13 16:43 ` Sagi Grimberg
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=20181213085107.17183-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox