From 7a4edfd7bbcd0a3bcb726bc8a109419a600273be Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Mon, 4 Oct 2021 18:27:02 +0100 Subject: [PATCH] net/ena: remove useless address check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by "gcc (GCC) 12.0.0 20211003 (experimental)": ./drivers/net/ena/ena_rss.c: In function ‘ena_rss_reta_query’: ./drivers/net/ena/ena_rss.c:140:66: error: the comparison will always evaluate as ‘false’ for the pointer operand in ‘reta_conf + 136’ must not be NULL [-Werror=address] 140 | (reta_size > RTE_RETA_GROUP_SIZE && ((reta_conf + 1) == NULL))) | ^~ Fixing it by removing useless check. Signed-off-by: Ferruh Yigit Acked-by: Michal Krawczyk --- drivers/net/ena/ena_rss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ena/ena_rss.c b/drivers/net/ena/ena_rss.c index 88afe13da0..152098410f 100644 --- a/drivers/net/ena/ena_rss.c +++ b/drivers/net/ena/ena_rss.c @@ -136,8 +136,7 @@ int ena_rss_reta_query(struct rte_eth_dev *dev, int reta_conf_idx; int reta_idx; - if (reta_size == 0 || reta_conf == NULL || - (reta_size > RTE_RETA_GROUP_SIZE && ((reta_conf + 1) == NULL))) + if (reta_size == 0 || reta_conf == NULL) return -EINVAL; if (!(dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) { -- 2.20.1