clang warns:
arch/arm/mach-iop13xx/pci.c:292:7: warning: logical not is only applied
to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!iop13xx_atux_pci_status(1) == 0)
^ ~~
arch/arm/mach-iop13xx/pci.c:439:7: warning: logical not is only applied
to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!iop13xx_atue_pci_status(1) == 0)
^ ~~
!func() == 0 is equivalent to func(), which clears up this warning and
makes the code more readable.
Link: https://github.com/ClangBuiltLinux/linux/issues/543
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
if (size != 4) {
val = iop13xx_atux_read(addr);
- if (!iop13xx_atux_pci_status(1) == 0)
+ if (iop13xx_atux_pci_status(1))
return PCIBIOS_SUCCESSFUL;
where = (where & 3) * 8;
if (size != 4) {
val = iop13xx_atue_read(addr);
- if (!iop13xx_atue_pci_status(1) == 0)
+ if (iop13xx_atue_pci_status(1))
return PCIBIOS_SUCCESSFUL;
where = (where & 3) * 8;