public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 13/17] drivers/scsi/initio.c: suppress compile warning
@ 2008-03-28 21:48 akpm
  2008-03-28 21:55 ` Grant Grundler
  0 siblings, 1 reply; 13+ messages in thread
From: akpm @ 2008-03-28 21:48 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, akpm, fujita.tomonori

From: Andrew Morton <akpm@linux-foundation.org>

powerpc:

drivers/scsi/initio.c: In function 'initio_build_scb':
drivers/scsi/initio.c:2585: warning: large integer implicitly truncated to unsigned type

Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/scsi/initio.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/initio.c~drivers-scsi-initioc-suppress-compile-warning drivers/scsi/initio.c
--- a/drivers/scsi/initio.c~drivers-scsi-initioc-suppress-compile-warning
+++ a/drivers/scsi/initio.c
@@ -2582,7 +2582,11 @@ static void initio_build_scb(struct init
 	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);
+	/*
+	 * The below needs casting to avoid a "large integer implicitly
+	 * truncated to unsigned type" warning on powerpc
+	 */
+	cblk->senselen = (u8)cpu_to_le32(SENSE_SIZE);
 	cmnd->SCp.ptr = (char *)(unsigned long)dma_addr;
 	cblk->cdblen = cmnd->cmd_len;
 
_

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

end of thread, other threads:[~2008-04-05 16:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 21:48 [patch 13/17] drivers/scsi/initio.c: suppress compile warning akpm
2008-03-28 21:55 ` Grant Grundler
2008-03-28 22:13   ` Andrew Morton
2008-03-28 22:26   ` James Bottomley
2008-03-28 22:43     ` Alan Cox
2008-03-28 23:51       ` James Bottomley
2008-03-29  0:49         ` Grant Grundler
2008-03-29  3:09           ` James Bottomley
2008-03-31  4:50             ` Grant Grundler
2008-03-31 14:56               ` James Bottomley
2008-03-31 16:23                 ` Grant Grundler
2008-04-04  7:05             ` Grant Grundler
2008-04-05 16:14               ` Grant Grundler

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