Commit 207928c6 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman

qed: Avoid constant logical operation warning in qed_vf_pf_acquire

[ Upstream commit 1c492a9d55ba99079210ed901dd8a5423f980487 ]

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 1fe614d1 ("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

Link: default avatarNathan Chancellor <>
Signed-off-by: default avatarDavid S. Miller <>
Signed-off-by: default avatarSasha Levin <>
parent 9afd2a2d
......@@ -295,7 +295,6 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
if (!p_iov->b_pre_fp_hsi &&
(resp->pfdev_info.minor_fp_hsi < ETH_HSI_VER_MINOR)) {
"PF is using older fastpath HSI; %02x.%02x is configured\n",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment