]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8871/1: iop13xx: Simplify iop13xx_atu{e,x}_pci_status checks
authorNathan Chancellor <natechancellor@gmail.com>
Wed, 26 Jun 2019 04:18:25 +0000 (05:18 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 23 Aug 2019 10:38:44 +0000 (11:38 +0100)
commit8ba7efb46dbddfc01f79e9920db29214b4c77ba8
tree89aed27cfd94f119361d2bf087dd87c889de5590
parent75eaf80f84ebc7588c50189fc3b72bcd0f66e5fc
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 <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>
arch/arm/mach-iop13xx/pci.c