On Fri, 2008-03-28 at 14:55 -0700, Grant Grundler wrote: > On Fri, Mar 28, 2008 at 2:48 PM, <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > > > > powerpc: > > > > drivers/scsi/initio.c: In function 'initio_build_scb': > > drivers/scsi/initio.c:2585: warning: large integer implicitly truncated to unsigned type > > I posted a fix for this yesterday and Alan Cox ACKed it. > > It's here: > http://marc.info/?l=linux-scsi&m=120668352622659&w=2 Actually, I have to say that neither of these looks to be correct. Andrew's is obviously wrong because (u8)cpu_to_le32(xxx) always returns zero on a BE platform if xxx is an 8 bit quantity. However, the driver clearly does a cblk->bufflen (a __le32 quantity) = cblk->senselen, which looks obviously wrong on a BE platform as well. Plus there's another hunk around here: scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); total_len += sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); ++sg; } here total_len is a le32 quantity cblk->buflen = (scsi_bufflen(cmnd) > total_len) ? here we compare against a CPU native quantity total_len : scsi_bufflen(cmnd); And here we set either to a le32 or cpu native quantity depending on the result of the comparison. Alan, has this driver ever worked on a BE platform? James -- 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