From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/cxgbe: remove useless address check
Date: Mon, 4 Oct 2021 18:27:54 +0100 [thread overview]
Message-ID: <20211004172754.3461732-1-ferruh.yigit@intel.com> (raw)
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>
---
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)
--
2.31.1
next reply other threads:[~2021-10-04 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 17:27 Ferruh Yigit [this message]
2021-10-04 19:32 ` Rahul Lakkireddy
2021-10-06 11:33 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211004172754.3461732-1-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=rahul.lakkireddy@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).