diff options
author | dingsenjie <dingsenjie@yulong.com> | 2021-06-18 15:34:31 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-18 12:07:48 -0700 |
commit | e44dc724826cc26bd5406eab156d2f633bb44d8d (patch) | |
tree | 080d4ab6746611d62017a6b4639a8eea7216e73c /drivers/net/ethernet | |
parent | 9fd2bc3206b31c8ff6d54d643730d4c3470471d6 (diff) | |
download | linux-e44dc724826cc26bd5406eab156d2f633bb44d8d.tar.bz2 |
ethernet: marvell/octeontx2: Simplify the return expression of npc_is_same
Simplify the return expression in the rvu_npc_fs.c
Signed-off-by: dingsenjie <dingsenjie@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c index 87d7c6ab047f..68633145a8b8 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c @@ -123,11 +123,8 @@ static bool npc_is_field_present(struct rvu *rvu, enum key_fields type, u8 intf) static bool npc_is_same(struct npc_key_field *input, struct npc_key_field *field) { - int ret; - - ret = memcmp(&input->layer_mdata, &field->layer_mdata, - sizeof(struct npc_layer_mdata)); - return ret == 0; + return memcmp(&input->layer_mdata, &field->layer_mdata, + sizeof(struct npc_layer_mdata)) == 0; } static void npc_set_layer_mdata(struct npc_mcam *mcam, enum key_fields type, |