DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/cxgbe: remove useless address check
@ 2021-10-04 17:27 Ferruh Yigit
  2021-10-04 19:32 ` Rahul Lakkireddy
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2021-10-04 17:27 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: Ferruh Yigit, 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 <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


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

* Re: [dpdk-dev] [PATCH] net/cxgbe: remove useless address check
  2021-10-04 17:27 [dpdk-dev] [PATCH] net/cxgbe: remove useless address check Ferruh Yigit
@ 2021-10-04 19:32 ` Rahul Lakkireddy
  2021-10-06 11:33   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Lakkireddy @ 2021-10-04 19:32 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Monday, October 10/04/21, 2021 at 18:27:54 +0100, Ferruh Yigit wrote:
> 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>

Looks good. Thanks for fixing it up.

Reviewed-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>

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

* Re: [dpdk-dev] [PATCH] net/cxgbe: remove useless address check
  2021-10-04 19:32 ` Rahul Lakkireddy
@ 2021-10-06 11:33   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2021-10-06 11:33 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dev

On 10/4/2021 8:32 PM, Rahul Lakkireddy wrote:
> On Monday, October 10/04/21, 2021 at 18:27:54 +0100, Ferruh Yigit wrote:
>> 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>
> 
> Looks good. Thanks for fixing it up.
> 
> Reviewed-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> 

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2021-10-06 11:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 17:27 [dpdk-dev] [PATCH] net/cxgbe: remove useless address check Ferruh Yigit
2021-10-04 19:32 ` Rahul Lakkireddy
2021-10-06 11:33   ` Ferruh Yigit

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