From: Guixin Liu <kanie@linux.alibaba.com>
To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
kch@nvidia.com
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH] nvmet: fix the warning of assigne int to __le16
Date: Fri, 8 Nov 2024 16:30:30 +0800 [thread overview]
Message-ID: <20241108083030.22555-1-kanie@linux.alibaba.com> (raw)
Even though NVME_CNTLID_DYNAMIC is 0xffff, we still need use
cpu_to_le16 to translate it to litte-endian.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/nvme/target/pr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/pr.c b/drivers/nvme/target/pr.c
index 60899c22e7b6..bef82135a0e7 100644
--- a/drivers/nvme/target/pr.c
+++ b/drivers/nvme/target/pr.c
@@ -854,7 +854,7 @@ static void nvmet_execute_pr_report(struct nvmet_req *req)
/*
* Dynamic controller, set cntlid to 0xffff.
*/
- ctrl_eds->cntlid = NVME_CNTLID_DYNAMIC;
+ ctrl_eds->cntlid = cpu_to_le16(NVME_CNTLID_DYNAMIC);
if (rtype == NVME_PR_WRITE_EXCLUSIVE_ALL_REGS ||
rtype == NVME_PR_EXCLUSIVE_ACCESS_ALL_REGS)
ctrl_eds->rcsts = 1;
--
2.43.0
next reply other threads:[~2024-11-08 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 8:30 Guixin Liu [this message]
2024-11-08 15:54 ` [PATCH] nvmet: fix the warning of assigne int to __le16 Keith Busch
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=20241108083030.22555-1-kanie@linux.alibaba.com \
--to=kanie@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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