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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 26 Sep 2018 20:24:50 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     natechancellor@...il.com
Cc:     Ariel.Elior@...ium.com, everest-linux-l2@...ium.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] qed: Avoid constant logical operation warning in
 qed_vf_pf_acquire

From: Nathan Chancellor <natechancellor@...il.com>
Date: Mon, 24 Sep 2018 15:17:03 -0700

> Clang warns when a constant is used in a boolean context as it thinks a
> bitwise operation may have been intended.
> 
> drivers/net/ethernet/qlogic/qed/qed_vf.c:415:27: warning: use of logical
> '&&' with constant operand [-Wconstant-logical-operand]
>         if (!p_iov->b_pre_fp_hsi &&
>                                  ^
> drivers/net/ethernet/qlogic/qed/qed_vf.c:415:27: note: use '&' for a
> bitwise operation
>         if (!p_iov->b_pre_fp_hsi &&
>                                  ^~
>                                  &
> drivers/net/ethernet/qlogic/qed/qed_vf.c:415:27: note: remove constant
> to silence this warning
>         if (!p_iov->b_pre_fp_hsi &&
>                                 ~^~
> 1 warning generated.
> 
> This has been here since commit 1fe614d10f45 ("qed: Relax VF firmware
> requirements") and I am not entirely sure why since 0 isn't a special
> case. Just remove the statement causing Clang to warn since it isn't
> required.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/126
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ