All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: lpfc: Fix different base types in assignment
@ 2021-02-19  9:23 Yang Li
  0 siblings, 0 replies; only message in thread
From: Yang Li @ 2021-02-19  9:23 UTC (permalink / raw)
  To: martin.petersen
  Cc: jejb, dick.kennedy, james.smart, linux-scsi, linux-kernel, Yang Li

Fix the following sparse warnings:
drivers/scsi/lpfc/lpfc_nvme.c:833:22: warning: incorrect type in
assignment (different base types)

cpu_to_le32() returns __le32, but sgl->sge_len is uint32_t type.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/scsi/lpfc/lpfc_nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 39d147e..b916a20 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -833,7 +833,7 @@
 	 * operation.
 	 */
 	sgl = lpfc_ncmd->dma_sgl;
-	sgl->sge_len = cpu_to_le32(nCmd->cmdlen);
+	sgl->sge_len = (__force uint32_t)cpu_to_le32(nCmd->cmdlen);
 	if (phba->cfg_nvme_embed_cmd) {
 		sgl->addr_hi = 0;
 		sgl->addr_lo = 0;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-19  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19  9:23 [PATCH] scsi: lpfc: Fix different base types in assignment Yang Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.