lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 7 Jan 2021 17:26:40 +0100
From:   Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     John Crispin <john@...ozen.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com,
        Dmitry Golovin <dima@...ovin.in>
Subject: Re: [PATCH] MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT
 against 0

On Tue, Jan 05, 2021 at 01:15:48PM -0700, Nathan Chancellor wrote:
> When building xway_defconfig with clang:
> 
> arch/mips/lantiq/irq.c:305:48: error: use of logical '&&' with constant
> operand [-Werror,-Wconstant-logical-operand]
>         if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
>                                                       ^ ~~~~~~~~~~~~~~~~~
> arch/mips/lantiq/irq.c:305:48: note: use '&' for a bitwise operation
>         if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
>                                                       ^~
>                                                       &
> arch/mips/lantiq/irq.c:305:48: note: remove constant to silence this
> warning
>         if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT)
>                                                      ~^~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> 
> Explicitly compare the constant LTQ_EBU_PCC_ISTAT against 0 to fix the
> warning. Additionally, remove the unnecessary parentheses as this is a
> simple conditional statement and shorthand '== 0' to '!'.
> 
> Fixes: 3645da0276ae ("OF: MIPS: lantiq: implement irq_domain support")
> Link: https://github.com/ClangBuiltLinux/linux/issues/807
> Reported-by: Dmitry Golovin <dima@...ovin.in>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>  arch/mips/lantiq/irq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ