public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, akpm@linux-foundation.org,
	fujita.tomonori@lab.ntt.co.jp
Subject: [patch 13/17] drivers/scsi/initio.c: suppress compile warning
Date: Fri, 28 Mar 2008 14:48:41 -0700	[thread overview]
Message-ID: <200803282148.m2SLmfg7012252@imap1.linux-foundation.org> (raw)

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;
 
_

             reply	other threads:[~2008-03-28 21:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 21:48 akpm [this message]
2008-03-28 21:55 ` [patch 13/17] drivers/scsi/initio.c: suppress compile warning 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803282148.m2SLmfg7012252@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox