Linux: -Wlogical-not-parentheses in arch/arm/mach-iop13xx/pci.c

Created on 18 Jun 2019  路  4Comments  路  Source: ClangBuiltLinux/linux

reported via KernelCI: http://staging-storage.kernelci.org/next-clang/master/next-20190617/arm/iop13xx_defconfig/clang-8/build.log

../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:292:7: note: add parentheses after the '!' to evaluate the comparison first
                if (!iop13xx_atux_pci_status(1) == 0)
                    ^
                     (                              )
../arch/arm/mach-iop13xx/pci.c:292:7: note: add parentheses around left hand side expression to silence this warning
                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)
                    ^                           ~~
../arch/arm/mach-iop13xx/pci.c:439:7: note: add parentheses after the '!' to evaluate the comparison first
                if (!iop13xx_atue_pci_status(1) == 0)
                    ^
                     (                              )
../arch/arm/mach-iop13xx/pci.c:439:7: note: add parentheses around left hand side expression to silence this warning
                if (!iop13xx_atue_pci_status(1) == 0)
                    ^
                    (                          )
2 warnings generated.
-Wlogical-not-parentheses [ARCH] arm32 [BUG] linux [FIXED][LINUX] 5.4 [Reported-by] KernelCI

Most helpful comment

All 4 comments

My patch was picked up and merged into mainline: https://git.kernel.org/torvalds/c/4af014984273a2577bf36c6ee271ed02bc831a04

Was this page helpful?
0 / 5 - 0 ratings