diff mbox series

[v3,1/5] net/qede: fix minsize build

Message ID 20210808125139.3573701-2-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers show
Series more build tests | expand

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Thomas Monjalon Aug. 8, 2021, 12:51 p.m. UTC
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>
---
 drivers/net/qede/qede_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Devendra Singh Rawat Aug. 9, 2021, 5:15 a.m. UTC | #1
-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net> 
Sent: Sunday, August 8, 2021 6:22 PM
To: dev@dpdk.org
Cc: bruce.richardson@intel.com; david.marchand@redhat.com; Rasesh Mody <rmody@marvell.com>; Devendra Singh Rawat <dsinghrawat@marvell.com>
Subject: [EXT] [PATCH v3 1/5] net/qede: fix minsize build

External Email

----------------------------------------------------------------------
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>
---
 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 298f4e3e42..35cde561ba 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -721,9 +721,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.31.1

ACKed.

Thanks,
Devendra
Rasesh Mody Aug. 9, 2021, 7:11 a.m. UTC | #2
> From: Devendra Singh Rawat <dsinghrawat@marvell.com>
> Sent: Monday, August 9, 2021 10:46 AM
> 
> 
> 
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, August 8, 2021 6:22 PM
> To: dev@dpdk.org
> Cc: bruce.richardson@intel.com; david.marchand@redhat.com; Rasesh
> Mody <rmody@marvell.com>; Devendra Singh Rawat
> <dsinghrawat@marvell.com>
> Subject: [EXT] [PATCH v3 1/5] net/qede: fix minsize build
> 
> External Email
> 
> ----------------------------------------------------------------------
> 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: 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 298f4e3e42..35cde561ba 100644
> --- a/drivers/net/qede/qede_rxtx.c
> +++ b/drivers/net/qede/qede_rxtx.c
> @@ -721,9 +721,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.31.1
> 
> ACKed.
> 
> Thanks,
> Devendra
David Marchand Sept. 15, 2021, 3:16 p.m. UTC | #3
On Mon, Aug 9, 2021 at 7:15 AM Devendra Singh Rawat
<dsinghrawat@marvell.com> wrote:
>
>
>
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, August 8, 2021 6:22 PM
> To: dev@dpdk.org
> Cc: bruce.richardson@intel.com; david.marchand@redhat.com; Rasesh Mody <rmody@marvell.com>; Devendra Singh Rawat <dsinghrawat@marvell.com>
> Subject: [EXT] [PATCH v3 1/5] net/qede: fix minsize build
>
> External Email
>
> ----------------------------------------------------------------------
> 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>

Can you configure your mail client so that it quotes the original mail
with some '> ' prefix?
Your reply confused patchwork which added back a SoB from Thomas.


> ---
>  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 298f4e3e42..35cde561ba 100644
> --- a/drivers/net/qede/qede_rxtx.c
> +++ b/drivers/net/qede/qede_rxtx.c
> @@ -721,9 +721,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.31.1
>
> ACKed.

Please reply with a full tag so that patchwork catches it.

It saves me some time/brain cycles when applying patches.

Thanks.
diff mbox series

Patch

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 298f4e3e42..35cde561ba 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -721,9 +721,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);