Skip to content

Commit

Permalink
net/sfc/base: fix signed/unsigned mismatch
Browse files Browse the repository at this point in the history
[ upstream commit b69259c ]

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: 107cf1d ("net/sfc/base: move limits config to ef10 NIC board config")

Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
  • Loading branch information
andrewle-xilinx authored and kevintraynor committed Jun 24, 2019
1 parent 177260d commit e585af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/sfc/base/ef10_nic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ ef10_nic_board_cfg(
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) {
Expand Down

0 comments on commit e585af4

Please sign in to comment.