patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check
@ 2022-02-09 12:24 Yunjian Wang
  2022-02-09 15:32 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Yunjian Wang @ 2022-02-09 12:24 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, thomas, andrew.rybchenko, dingxiaoxiong,
	huangshaozhang, Yunjian Wang, stable

This NULL check is unnecessary, 'eth_dev' is never NULL.

Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 lib/ethdev/rte_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 29e21ad580..c13149cbd3 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6312,8 +6312,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
 		return -EINVAL;
 
 	eth_dev = &rte_eth_devices[port_id];
-	if (!eth_dev)
-		return -EINVAL;
 
 	rxq_state = rte_tel_data_alloc();
 	if (!rxq_state)
-- 
2.27.0


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

* Re: [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check
  2022-02-09 12:24 [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check Yunjian Wang
@ 2022-02-09 15:32 ` Stephen Hemminger
  2022-02-10 11:14   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2022-02-09 15:32 UTC (permalink / raw)
  To: Yunjian Wang
  Cc: dev, ferruh.yigit, thomas, andrew.rybchenko, dingxiaoxiong,
	huangshaozhang, stable

On Wed, 9 Feb 2022 20:24:10 +0800
Yunjian Wang <wangyunjian@huawei.com> wrote:

> This NULL check is unnecessary, 'eth_dev' is never NULL.
> 
> Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>


Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check
  2022-02-09 15:32 ` Stephen Hemminger
@ 2022-02-10 11:14   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2022-02-10 11:14 UTC (permalink / raw)
  To: Stephen Hemminger, Yunjian Wang
  Cc: dev, thomas, andrew.rybchenko, dingxiaoxiong, huangshaozhang, stable

On 2/9/2022 3:32 PM, Stephen Hemminger wrote:
> On Wed, 9 Feb 2022 20:24:10 +0800
> Yunjian Wang <wangyunjian@huawei.com> wrote:
> 
>> This NULL check is unnecessary, 'eth_dev' is never NULL.
>>
>> Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> 
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

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

end of thread, other threads:[~2022-02-10 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 12:24 [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check Yunjian Wang
2022-02-09 15:32 ` Stephen Hemminger
2022-02-10 11:14   ` 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).