net/qede: fix minsize build
authorThomas Monjalon <thomas@monjalon.net>
Sun, 8 Aug 2021 12:51:34 +0000 (14:51 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 15 Sep 2021 15:11:56 +0000 (17:11 +0200)
commit11c2e4b41c962414e7183222a6504697493d9433
tree65329f2b588ee038f312bdee3ab663ca9926b625
parentdfb1ad1e7a070926c9bd9fdf38e6b944a21f1d49
net/qede: fix minsize build

Error occurs when configuring meson with --buildtype=minsize
with GCC 11.1.0:

In function ‘__internal_ram_wr_relaxed’,
    inlined from ‘internal_ram_wr’ at ecore_int_api.h:166:2,
    inlined from ‘qede_update_rx_prod.constprop’ at qede_rxtx.c:736:2:
drivers/net/qede/base/bcm_osal.h:136:9: error:
‘rx_prods’ is used uninitialized [-Werror=uninitialized]
|         rte_write32_relaxed((_val), (_reg_addr))
|         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ecore_int_api.h:151:17: note: in expansion of macro ‘DIRECT_REG_WR_RELAXED’
|                 DIRECT_REG_WR_RELAXED(p_hwfn, &((u32 OSAL_IOMEM *)addr)[i],
|                 ^~~~~~~~~~~~~~~~~~~~~
drivers/net/qede/qede_rxtx.c: In function ‘qede_update_rx_prod.constprop’:
drivers/net/qede/qede_rxtx.c:724:33: note: ‘rx_prods’ declared here
|         struct eth_rx_prod_data rx_prods = { 0 };
|                                 ^~~~~~~~

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
drivers/net/qede/qede_rxtx.c