numam-dpdk/drivers/common
Stephen Hemminger cececca099 common/mlx5: fix uninitialized RoCE variable
Gcc 8.3.0 (Debian 10) complains about uninitialized variable.

[474/2122] Compiling C object
'drivers/a715181@@tmp_rte_common_mlx5@sta/common_mlx5_mlx5_nl.c.o'.
In file included from ../drivers/common/mlx5/mlx5_nl.h:12,
                 from ../drivers/common/mlx5/mlx5_nl.c:23:
../drivers/common/mlx5/mlx5_nl.c: In function ‘mlx5_nl_enable_roce_get’:
../drivers/common/mlx5/mlx5_common.h:68:2: warning: ‘cur_en’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  rte_log(RTE_LOG_ ## level, \
  ^~~~~~~
../drivers/common/mlx5/mlx5_nl.c:1560:6: note: ‘cur_en’ was declared here
  int cur_en;
      ^~~~~~

The compiler is correct, this variable would only be set if kernel
netlink response message contains the DEVLINK parameter that flags if
ROCE is enabled.

Fixes: fa69eaef5f ("common/mlx5: support ROCE disable through Netlink")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2020-05-05 15:54:26 +02:00
..
cpt replace hot attributes 2020-04-16 18:30:58 +02:00
dpaax replace hot attributes 2020-04-16 18:30:58 +02:00
iavf version: reference next ABI 21 for recent additions 2020-05-05 00:25:34 +02:00
mlx5 common/mlx5: fix uninitialized RoCE variable 2020-05-05 15:54:26 +02:00
mvep build: align symbols with global ABI version 2019-11-20 23:05:39 +01:00
octeontx net/octeontx: add application domain validation 2019-11-26 07:49:30 +01:00
octeontx2 version: reference next ABI 21 for recent additions 2020-05-05 00:25:34 +02:00
qat compress/qat: support IM buffer too small operation 2020-04-19 17:15:14 +02:00
Makefile net/ice: add DCF hardware initialization 2020-04-21 13:57:05 +02:00
meson.build common/mlx5: introduce common library 2020-02-05 09:51:20 +01:00