* [patch 2/2] [SCSI] pmcraid: cpu_to_le32() => cpu_to_le64()
@ 2011-12-16 10:21 ` Dan Carpenter
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* [patch 2/2] [SCSI] pmcraid: cpu_to_le32() => cpu_to_le64()
@ 2011-12-16 10:21 ` Dan Carpenter
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* Re: [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
-1 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-04-30 16:03 UTC (permalink / raw)
To: Dan Carpenter
Cc: Anil Ravindranath, James E.J. Bottomley, linux-scsi, kernel-janitors
ping?
regards,
dan carpenter
On 12/16/11, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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;
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2/2] [SCSI] pmcraid: cpu_to_le32() => cpu_to_le64()
@ 2012-04-30 16:03 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-04-30 16:03 UTC (permalink / raw)
To: Dan Carpenter
Cc: Anil Ravindranath, James E.J. Bottomley, linux-scsi, kernel-janitors
ping?
regards,
dan carpenter
On 12/16/11, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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;
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-30 16:03 UTC | newest]
Thread overview: 4+ 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
2011-12-16 10:21 ` Dan Carpenter
2012-04-30 16:03 ` Dan Carpenter
2012-04-30 16:03 ` Dan Carpenter
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.