[PATCH] sata_sx4.c warning fix
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.
Showing
Please register or sign in to comment