numam-dpdk/drivers
Ferruh Yigit b3c740e037 net/bnx2x: fix build with GCC 11
Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0 20210509 (experimental)

Build error:
In file included from ../drivers/net/bnx2x/bnx2x_rxtx.c:8:
../drivers/net/bnx2x/bnx2x_rxtx.c: In function ‘bnx2x_upd_rx_prod_fast’:
../drivers/net/bnx2x/bnx2x.h:1528:35:
    warning: ‘rx_prods’ is used uninitialized [-Wuninitialized]
 #define REG_WR32(sc, offset, val) bnx2x_reg_write32(sc, (offset), val)
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1531:33:
	note: in expansion of macro ‘REG_WR32’
 1531 | #define REG_WR(sc, offset, val) REG_WR32(sc, offset, val)
      |                                 ^~~~~~~~
../drivers/net/bnx2x/bnx2x_rxtx.c:331:9:
	note: in expansion of macro ‘REG_WR’
  331 |         REG_WR(sc, fp->ustorm_rx_prods_offset, val[0]);
      |         ^~~~~~
../drivers/net/bnx2x/bnx2x_rxtx.c:324:40: note: ‘rx_prods’ declared here
  324 |         struct ustorm_eth_rx_producers rx_prods = { 0 };
      |                                        ^~~~~~~~

REG_WR32 requires 'uint32_t', use union instead of cast to 'uint32_t'.

Bugzilla ID: 692
Fixes: 38dff79ba7 ("net/bnx2x: update HSI")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2021-05-12 14:54:16 +02:00
..
baseband log: register with standardized names 2021-05-11 15:17:55 +02:00
bus log: register with standardized names 2021-05-11 15:17:55 +02:00
common log: register with standardized names 2021-05-11 15:17:55 +02:00
compress log: register with standardized names 2021-05-11 15:17:55 +02:00
crypto log: register with standardized names 2021-05-11 15:17:55 +02:00
event log: register with standardized names 2021-05-11 15:17:55 +02:00
mempool log: register with standardized names 2021-05-11 15:17:55 +02:00
net net/bnx2x: fix build with GCC 11 2021-05-12 14:54:16 +02:00
raw raw/ioat: fix parameter shadow warning 2021-05-12 16:33:14 +02:00
regex log: register with standardized names 2021-05-11 15:17:55 +02:00
vdpa log: register with standardized names 2021-05-11 15:17:55 +02:00
meson.build log: register with standardized names 2021-05-11 15:17:55 +02:00