nvmet: fix the warning of assigne int to __le16
Subsystems (2)
PATCH 1/1 nvmet: fix the warning of assigne int to __le16
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 <[email protected]>
--- drivers/nvme/target/pr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/pr.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Keith Busch
maintainerQuoted 2 lines · Guixin Liu
Even though
NVME_CNTLID_DYNAMICis0xffff, we still need usecpu_to_le16to translate it to litte-endian.
Folded in, nvme-6.13 updated. Thanks.