[dpdk-stable] patch 'net/ena: fix build for O1 optimization' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:05:05 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 6fc3588de0e2085d1ac60aae506e61ba98ee80a5 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Mon, 11 May 2020 17:07:24 +0100
Subject: [PATCH] net/ena: fix build for O1 optimization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 5f267cb01b41def2af37b8fa56828e75ae91add0 ]

Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)

Build error:
.../drivers/net/ena/ena_ethdev.c: In function ‘eth_ena_dev_init’:
.../drivers/net/ena/ena_ethdev.c:1815:20:
    error: ‘wd_state’ may be used uninitialized in this function
           [-Werror=maybe-uninitialized]
 1815 |  adapter->wd_state = wd_state;
      |  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~

This looks like false positive, fixing by assigning initial value to
'wd_state' variable.

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Michal Krawczyk <mk at semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 36e9b4ad9e..e8753ce010 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1674,7 +1674,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 	int rc;
 
 	static int adapters_found;
-	bool wd_state;
+	bool wd_state = false;
 
 	eth_dev->dev_ops = &ena_dev_ops;
 	eth_dev->rx_pkt_burst = &eth_ena_recv_pkts;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.443739711 +0100
+++ 0170-net-ena-fix-build-for-O1-optimization.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,4 +1,4 @@
-From 5f267cb01b41def2af37b8fa56828e75ae91add0 Mon Sep 17 00:00:00 2001
+From 6fc3588de0e2085d1ac60aae506e61ba98ee80a5 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit at intel.com>
 Date: Mon, 11 May 2020 17:07:24 +0100
 Subject: [PATCH] net/ena: fix build for O1 optimization
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 5f267cb01b41def2af37b8fa56828e75ae91add0 ]
+
 Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
 gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
 
@@ -27,13 +29,13 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index c3fd3a4ac0..fbddc79f79 100644
+index 36e9b4ad9e..e8753ce010 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1756,7 +1756,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1674,7 +1674,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
  	int rc;
+ 
  	static int adapters_found;
- 	bool disable_meta_caching;
 -	bool wd_state;
 +	bool wd_state = false;
  


More information about the stable mailing list