From: Yajun Deng <yajun.deng@linux.dev>
To: davem@davemloft.net, kuba@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Yajun Deng <yajun.deng@linux.dev>
Subject: [PATCH net-next] neighbor: Remove redundant if statement
Date: Mon, 22 Nov 2021 16:49:09 +0800 [thread overview]
Message-ID: <20211122084909.18093-1-yajun.deng@linux.dev> (raw)
The if statement already exists in the __neigh_event_send() function,
remove redundant if statement.
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
include/net/neighbour.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 38a0c1d24570..667129827816 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -452,9 +452,7 @@ static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
if (READ_ONCE(neigh->used) != now)
WRITE_ONCE(neigh->used, now);
- if (!(neigh->nud_state&(NUD_CONNECTED|NUD_DELAY|NUD_PROBE)))
- return __neigh_event_send(neigh, skb);
- return 0;
+ return __neigh_event_send(neigh, skb);
}
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
--
2.32.0
next reply other threads:[~2021-11-22 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 8:49 Yajun Deng [this message]
2021-11-22 9:16 ` [PATCH net-next] neighbor: Remove redundant if statement Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211122084909.18093-1-yajun.deng@linux.dev \
--to=yajun.deng@linux.dev \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox