patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 20.11 1/4] net/ena: remove useless address check
@ 2022-12-08 14:49 David Marchand
  2022-12-08 14:49 ` [PATCH 20.11 2/4] net/ena: fix build with GCC 12 David Marchand
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Marchand @ 2022-12-08 14:49 UTC (permalink / raw)
  To: stable; +Cc: bluca, Ferruh Yigit, Michal Krawczyk

From: Ferruh Yigit <ferruh.yigit@intel.com>

[ upstream commit 7a4edfd7bbcd0a3bcb726bc8a109419a600273be ]

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 <ferruh.yigit@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Note on backport:
- moved change to ena_ethdev.c,

---
 drivers/net/ena/ena_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 64e38e49fa..a4aac5a892 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -643,8 +643,7 @@ static 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;
 
 	rte_spinlock_lock(&adapter->admin_lock);
-- 
2.38.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-08 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 20.11 3/4] net/qede: fix minsize build David Marchand
2022-12-08 14:49 ` [PATCH 20.11 4/4] crypto/ipsec_mb: fix build with GCC 12 David Marchand
2022-12-08 16:55 ` [PATCH 20.11 1/4] net/ena: remove useless address check Luca Boccassi

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).