2.6.25-rc6 initio senselen warning
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.
Signed-off-by Grant Grundler <[email protected]>
drivers/scsi/initio.c +1 -1
@@ -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;
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 typeand the code was:
cblk->senselen = cpu_to_le32(SENSE_SIZE);Given senselen is a u8, code is wrong.
Signed-off-by Grant Grundler <[email protected]>
Acked-by Alan Cox <[email protected]>