Commit 4af01498 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Russell King

ARM: 8871/1: iop13xx: Simplify iop13xx_atu{e,x}_pci_status checks

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/543Reported-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent d1abaeb3
...@@ -289,7 +289,7 @@ iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where, ...@@ -289,7 +289,7 @@ iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where,
if (size != 4) { if (size != 4) {
val = iop13xx_atux_read(addr); val = iop13xx_atux_read(addr);
if (!iop13xx_atux_pci_status(1) == 0) if (iop13xx_atux_pci_status(1))
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
where = (where & 3) * 8; where = (where & 3) * 8;
...@@ -436,7 +436,7 @@ iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where, ...@@ -436,7 +436,7 @@ iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where,
if (size != 4) { if (size != 4) {
val = iop13xx_atue_read(addr); val = iop13xx_atue_read(addr);
if (!iop13xx_atue_pci_status(1) == 0) if (iop13xx_atue_pci_status(1))
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
where = (where & 3) * 8; where = (where & 3) * 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment