[PATCH] 2.6.25-rc6 initio senselen warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>

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;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux