• Andrew Morton's avatar
    [PATCH] sata_sx4.c warning fix · 351cb4d0
    Andrew Morton authored
    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.
    351cb4d0
sata_sx4.c 38 KB