public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] [SCSI] pmcraid: cpu_to_le32() => cpu_to_le64()
@ 2011-12-16 10:21 Dan Carpenter
  2012-04-30 16:03 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-12-16 10:21 UTC (permalink / raw)
  To: Anil Ravindranath; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors

The cpu_to_le32() truncates the address to 32 bits.  All the other
places that set .address use cpu_to_le64().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
What about if dma_addr_t is 32 bits on a big endian system?  Can that
happen?

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index d6bc4e6..8a239ea 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -1242,7 +1242,7 @@ static struct pmcraid_cmd *pmcraid_init_hcam
 
 	ioadl[0].flags |= IOADL_FLAGS_READ_LAST;
 	ioadl[0].data_len = cpu_to_le32(rcb_size);
-	ioadl[0].address = cpu_to_le32(dma);
+	ioadl[0].address = cpu_to_le64(dma);
 
 	cmd->cmd_done = cmd_done;
 	return cmd;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-30 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16 10:21 [patch 2/2] [SCSI] pmcraid: cpu_to_le32() => cpu_to_le64() Dan Carpenter
2012-04-30 16:03 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox