Skip to contentSkip to conversation

2.6.25-rc6 initio senselen warning

PATCH In review Grant Grundler 2 participants 2 messages Mar 28, 2008 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.6.25-rc6 initio senselen warning

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.

drivers/scsi/initio.c +1 -1
index 0cc8868..0a21863 100644
@@ -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;
 
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Grant Grundler

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.