]> git.droids-corp.org - dpdk.git/commit
net/nfp: remove duplicated check when setting MAC address
authorMaxime Gouin <maxime.gouin@6wind.com>
Wed, 5 Jan 2022 10:32:02 +0000 (11:32 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Jan 2022 13:49:41 +0000 (14:49 +0100)
commit9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf
treed0edc119ba132237388d4f09332b3ba4f1d09913
parent728b6447e766fc0aaf59e888635d62d54e77a528
net/nfp: remove duplicated check when setting MAC address

Reported by code analysis tool C++test (version 10.4):

> /build/dpdk-20.11/drivers/net/nfp/nfp_net.c
> 546   Conditions "(hw->ctrl &NFP_NET_CFG_CTRL_ENABLE) &&
        !! (hw->cap &NFP_NET_CFG_C" is always evaluated to false
> 547   Condition "! (hw->cap &NFP_NET_CFG_C" is always evaluated to false

The previous "if" checks exactly the same condition. Removal of duplicate
code.

Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
Cc: stable@dpdk.org
Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/nfp/nfp_common.c