drivers/scsi/sata_sx4.c: In function `pdc20621_put_to_dimm': drivers/scsi/sata_sx4.c:928: warning: comparison is always true due to limited range of data type The code is doing, effectively: if ((long)(expr returning u32)) >= 0 but on 64-bit architectures, that will always be true. So cast the u32 result to s32 before promoting to long so that bit 31 correctly propagates into bits 32-63. --- 25-power4-akpm/drivers/scsi/sata_sx4.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/sata_sx4.c~sata_sx4-warning-fix drivers/scsi/sata_sx4.c --- 25-power4/drivers/scsi/sata_sx4.c~sata_sx4-warning-fix 2004-04-25 23:55:01.980197296 -0700 +++ 25-power4-akpm/drivers/scsi/sata_sx4.c 2004-04-25 23:55:01.984196688 -0700 @@ -925,7 +925,7 @@ static void pdc20621_put_to_dimm(struct readl(mmio + PDC_DIMM_WINDOW_CTLR); offset -= (idx * window_size); idx++; - dist = ((long) (window_size - (offset + size))) >= 0 ? size : + dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size : (long) (window_size - offset); memcpy_toio((char *) (dimm_mmio + offset / 4), (char *) psource, dist); writel(0x01, mmio + PDC_GENERAL_CTLR); _