Skip to content

Commit 4cd4f12

Browse files
nathanchanceAnte0
authored andcommitted
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 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: ClangBuiltLinux/linux#126 Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 5e7ee90 commit 4cd4f12

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/net/ethernet/qlogic/qed/qed_vf.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
295295
}
296296

297297
if (!p_iov->b_pre_fp_hsi &&
298-
ETH_HSI_VER_MINOR &&
299298
(resp->pfdev_info.minor_fp_hsi < ETH_HSI_VER_MINOR)) {
300299
DP_INFO(p_hwfn,
301300
"PF is using older fastpath HSI; %02x.%02x is configured\n",

0 commit comments

Comments
 (0)