diff mbox series

ethernet: marvell/octeontx2: Simplify the return expression of npc_is_same

Message ID 20210618073431.103924-1-dingsenjie@163.com (mailing list archive)
State Accepted
Commit e44dc724826cc26bd5406eab156d2f633bb44d8d
Delegated to: Netdev Maintainers
Headers show
Series ethernet: marvell/octeontx2: Simplify the return expression of npc_is_same | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 2 maintainers not CCed: sbhatta@marvell.com hkelam@marvell.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

dingsenjie@163.com June 18, 2021, 7:34 a.m. UTC
From: dingsenjie <dingsenjie@yulong.com>

Simplify the return expression in the rvu_npc_fs.c

Signed-off-by: dingsenjie <dingsenjie@yulong.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org June 18, 2021, 7:20 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri, 18 Jun 2021 15:34:31 +0800 you wrote:
> From: dingsenjie <dingsenjie@yulong.com>
> 
> Simplify the return expression in the rvu_npc_fs.c
> 
> Signed-off-by: dingsenjie <dingsenjie@yulong.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)

Here is the summary with links:
  - ethernet: marvell/octeontx2: Simplify the return expression of npc_is_same
    https://git.kernel.org/netdev/net-next/c/e44dc724826c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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 14832b6..1995df4 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -116,11 +116,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,