net/cxgbe: remove useless address check
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 4 Oct 2021 17:27:54 +0000 (18:27 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 6 Oct 2021 11:22:18 +0000 (13:22 +0200)
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 <ferruh.yigit@intel.com>
Reviewed-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/cxgbe_ethdev.c

index 3abe5c3..15d9548 100644 (file)
@@ -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)