[dpdk-stable] patch 'net/bnxt: fix compilation with -Og' has been queued to stable release 17.08.1
Yuanhan Liu
yliu at fridaylinux.org
Tue Nov 21 14:16:55 CET 2017
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1b680e7b1780b4251f1700d711e4661e866c43f6 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Mon, 11 Sep 2017 17:13:24 +0200
Subject: [PATCH] net/bnxt: fix compilation with -Og
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4a671fdea9f41ecb0a6113b66d21a8eed5ac06ec ]
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_pmd_bnxt.o
rte_pmd_bnxt.c: In function ‘rte_pmd_bnxt_set_all_queues_drop_en’:
rte_pmd_bnxt.c:116:6: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
int rc;
^~
This can happen if both bp->nr_vnics and bp->pf.active_vfs are 0.
Fix it by initializing rc to -EINVAL.
Fixes: 49947a13ba9e ("net/bnxt: support Tx loopback, set VF MAC and queues drop")
Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
---
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 0bf5db5..ef4b19b 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -113,7 +113,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
struct rte_eth_dev *eth_dev;
struct bnxt *bp;
uint32_t i;
- int rc;
+ int rc = -EINVAL;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
--
2.7.4
More information about the stable
mailing list