net/sfc/base: fix comparison always true warning

Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.

Fixes: 9ee64bd404 ("net/sfc/base: import loopback control")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Andrew Rybchenko 2018-04-09 12:58:57 +01:00 committed by Ferruh Yigit
parent bd768ccfb1
commit 06619ede18

View File

@ -120,7 +120,7 @@ efx_port_loopback_set(
EFSYS_ASSERT(link_mode < EFX_LINK_NMODES); EFSYS_ASSERT(link_mode < EFX_LINK_NMODES);
if (EFX_TEST_QWORD_BIT(encp->enc_loopback_types[link_mode], if (EFX_TEST_QWORD_BIT(encp->enc_loopback_types[link_mode],
loopback_type) == 0) { (int)loopback_type) == 0) {
rc = ENOTSUP; rc = ENOTSUP;
goto fail1; goto fail1;
} }