All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.25-rc6 initio senselen warning
@ 2008-03-28  5:51 Grant Grundler
  2008-03-28 10:08 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Grant Grundler @ 2008-03-28  5:51 UTC (permalink / raw)
  To: linux-scsi; +Cc: Alan Cox


Building initio on parisc with gcc-4.3 yielded this warning:
drivers/scsi/initio.c:2585: warning: large integer implicitly truncated to unsigned type

and the code was:
        cblk->senselen = cpu_to_le32(SENSE_SIZE);

Given senselen is a u8, code is wrong.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 0cc8868..0a21863 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2582,7 +2582,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c
 	dma_addr = dma_map_single(&host->pci_dev->dev, cmnd->sense_buffer,
 				  SENSE_SIZE, DMA_FROM_DEVICE);
 	cblk->senseptr = cpu_to_le32((u32)dma_addr);
-	cblk->senselen = cpu_to_le32(SENSE_SIZE);
+	cblk->senselen = SENSE_SIZE;
 	cmnd->SCp.ptr = (char *)(unsigned long)dma_addr;
 	cblk->cdblen = cmnd->cmd_len;
 

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

* Re: [PATCH] 2.6.25-rc6 initio senselen warning
  2008-03-28  5:51 [PATCH] 2.6.25-rc6 initio senselen warning Grant Grundler
@ 2008-03-28 10:08 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2008-03-28 10:08 UTC (permalink / raw)
  To: Grant Grundler; +Cc: linux-scsi, Alan Cox

On Thu, Mar 27, 2008 at 11:51:43PM -0600, Grant Grundler wrote:
> 
> Building initio on parisc with gcc-4.3 yielded this warning:
> drivers/scsi/initio.c:2585: warning: large integer implicitly truncated to unsigned type
> 
> and the code was:
>         cblk->senselen = cpu_to_le32(SENSE_SIZE);
> 
> Given senselen is a u8, code is wrong.
> 
> Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

Acked-by: Alan Cox <alan@redhat.com>

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

end of thread, other threads:[~2008-03-28 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28  5:51 [PATCH] 2.6.25-rc6 initio senselen warning Grant Grundler
2008-03-28 10:08 ` Alan Cox

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.