[dpdk-dev] [PATCH 02/29] net/sfc/base: fix signed/unsigned mismatch errors

Andrew Rybchenko arybchenko at solarflare.com
Mon Jun 10 09:38:17 CEST 2019


From: Andrew Lee <alee at solarflare.com>

Use UINT32_MAX instead of assigning -1 to a uint32_t variable to
resolve "conversion from 'int' to 'uint32_t', signed/unsigned mismatch"
errors produced by the Visual Studio 2017 toolchain [with the default
/W4 /WX C compiler options which set warning level 4 and treat warnings
as errors].

Fixes: 107cf1d792cb ("net/sfc/base: move limits config to ef10 NIC board config")
Cc: stable at dpdk.org

Signed-off-by: Andrew Lee <alee at solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 drivers/net/sfc/base/ef10_nic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
index 1d7e6d8..052b4ff 100644
--- a/drivers/net/sfc/base/ef10_nic.c
+++ b/drivers/net/sfc/base/ef10_nic.c
@@ -1936,7 +1936,7 @@
 	encp->enc_rxq_limit = EFX_RXQ_LIMIT_TARGET;
 	encp->enc_txq_limit = EFX_TXQ_LIMIT_TARGET;
 
-	encp->enc_buftbl_limit = 0xFFFFFFFF;
+	encp->enc_buftbl_limit = UINT32_MAX;
 
 	/* Get interrupt vector limits */
 	if ((rc = efx_mcdi_get_vector_cfg(enp, &base, &nvec, NULL)) != 0) {
-- 
1.8.3.1



More information about the dev mailing list