提交 a2a65a3e 编写于 作者: E Eric Sesterhenn 提交者: James Bottomley

[SCSI] Signedness issue in drivers/scsi/ipr.c

gcc 4.1 with some extra warnings show the following:

drivers/scsi/ipr.c:6361: warning: comparison of unsigned expression < 0 is always false
drivers/scsi/ipr.c:6385: warning: comparison of unsigned expression < 0 is always false
drivers/scsi/ipr.c:6415: warning: comparison of unsigned expression < 0 is always false

The problem is that rc is of the type u32, which can never be smaller than
zero, therefore all three error handling checks get useless.  This patch
changes it to a normal int, because all usages / all functions it get used
with expect an int.
Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NBrian King <brking@us.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 dcbccbde
......@@ -6996,7 +6996,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
struct Scsi_Host *host;
unsigned long ipr_regs_pci;
void __iomem *ipr_regs;
u32 rc = PCIBIOS_SUCCESSFUL;
int rc = PCIBIOS_SUCCESSFUL;
volatile u32 mask, uproc;
ENTER;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册