patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: stable@dpdk.org
Cc: bluca@debian.org, Thomas Monjalon <thomas@monjalon.net>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>,
	Rasesh Mody <rmody@marvell.com>
Subject: [PATCH 20.11 3/4] net/qede: fix minsize build
Date: Thu,  8 Dec 2022 15:49:09 +0100	[thread overview]
Message-ID: <20221208144910.360883-3-david.marchand@redhat.com> (raw)
In-Reply-To: <20221208144910.360883-1-david.marchand@redhat.com>

From: Thomas Monjalon <thomas@monjalon.net>

[ upstream commit 11c2e4b41c962414e7183222a6504697493d9433 ]

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index f357a8f258..65acad2789 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -714,9 +714,10 @@ qede_update_rx_prod(__rte_unused struct qede_dev *edev,
 {
 	uint16_t bd_prod = ecore_chain_get_prod_idx(&rxq->rx_bd_ring);
 	uint16_t cqe_prod = ecore_chain_get_prod_idx(&rxq->rx_comp_ring);
-	struct eth_rx_prod_data rx_prods = { 0 };
+	struct eth_rx_prod_data rx_prods;
 
 	/* Update producers */
+	memset(&rx_prods, 0, sizeof(rx_prods));
 	rx_prods.bd_prod = rte_cpu_to_le_16(bd_prod);
 	rx_prods.cqe_prod = rte_cpu_to_le_16(cqe_prod);
 
-- 
2.38.1


  parent reply	other threads:[~2022-12-08 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 14:49 [PATCH 20.11 1/4] net/ena: remove useless address check David Marchand
2022-12-08 14:49 ` [PATCH 20.11 2/4] net/ena: fix build with GCC 12 David Marchand
2022-12-08 14:49 ` David Marchand [this message]
2022-12-08 14:49 ` [PATCH 20.11 4/4] crypto/ipsec_mb: " David Marchand
2022-12-08 16:55 ` [PATCH 20.11 1/4] net/ena: remove useless address check Luca Boccassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221208144910.360883-3-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=bluca@debian.org \
    --cc=dsinghrawat@marvell.com \
    --cc=rmody@marvell.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).