From patchwork Mon Oct 4 17:27:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 100450 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DBF82A0C4D; Mon, 4 Oct 2021 20:58:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A37E64068F; Mon, 4 Oct 2021 20:58:58 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D13E240688 for ; Mon, 4 Oct 2021 20:58:56 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10127"; a="224322960" X-IronPort-AV: E=Sophos;i="5.85,346,1624345200"; d="scan'208";a="224322960" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2021 10:27:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,346,1624345200"; d="scan'208";a="521510855" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by orsmga001.jf.intel.com with ESMTP; 04 Oct 2021 10:27:56 -0700 From: Ferruh Yigit To: Rahul Lakkireddy Cc: Ferruh Yigit , dev@dpdk.org Date: Mon, 4 Oct 2021 18:27:54 +0100 Message-Id: <20211004172754.3461732-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/cxgbe: remove useless address check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/cxgbe/cxgbe_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 177eca397600..6ca9017e5dfb 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)