From: Ferruh Yigit Date: Mon, 4 Oct 2021 17:27:54 +0000 (+0100) Subject: net/cxgbe: remove useless address check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a99bf9516c8db46a1b8fbb6f8f37e1242b96ee4e;p=dpdk.git net/cxgbe: remove useless address check reported by "gcc (GCC) 12.0.0 20211003 (experimental)": ../drivers/net/cxgbe/cxgbe_ethdev.c: In function ‘cxgbe_dev_rx_queue_setup’: ../drivers/net/cxgbe/cxgbe_ethdev.c:682:24: error: the comparison will always evaluate as ‘true’ for the address of ‘fl’ will never be NULL [-Werror=address] 682 | if ((&rxq->fl) != NULL) | ^~ Fixing it by removing useless check. Signed-off-by: Ferruh Yigit Reviewed-by: Rahul Lakkireddy --- diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 3abe5c3eed..15d9548f79 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -679,8 +679,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, } rxq->rspq.size = temp_nb_desc; - if ((&rxq->fl) != NULL) - rxq->fl.size = temp_nb_desc; + rxq->fl.size = temp_nb_desc; /* Set to jumbo mode if necessary */ if (pkt_len > CXGBE_ETH_MAX_LEN)