From: Nathan Chancellor Date: Wed, 26 Jun 2019 04:18:25 +0000 (+0100) Subject: ARM: 8871/1: iop13xx: Simplify iop13xx_atu{e,x}_pci_status checks X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4af014984273a2577bf36c6ee271ed02bc831a04;p=linux.git 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/543 Reported-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Russell King --- diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 46ea06e906ccf..94d30bc7bba16 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -289,7 +289,7 @@ iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where, 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; @@ -436,7 +436,7 @@ iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where, 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;