* [PATCH] nvmet: fix the warning of assigne int to __le16
@ 2024-11-08 8:30 Guixin Liu
2024-11-08 15:54 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Guixin Liu @ 2024-11-08 8:30 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi, kch; +Cc: linux-nvme
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvmet: fix the warning of assigne int to __le16
2024-11-08 8:30 [PATCH] nvmet: fix the warning of assigne int to __le16 Guixin Liu
@ 2024-11-08 15:54 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2024-11-08 15:54 UTC (permalink / raw)
To: Guixin Liu; +Cc: axboe, hch, sagi, kch, linux-nvme
On Fri, Nov 08, 2024 at 04:30:30PM +0800, Guixin Liu wrote:
> Even though NVME_CNTLID_DYNAMIC is 0xffff, we still need use
> cpu_to_le16 to translate it to litte-endian.
Folded in, nvme-6.13 updated. Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-08 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 8:30 [PATCH] nvmet: fix the warning of assigne int to __le16 Guixin Liu
2024-11-08 15:54 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox