diff mbox series

[net-next] ipv6: Remove redundant unlikely()

Message ID 20241008085454.8087-1-tklauser@distanz.ch (mailing list archive)
State Accepted
Commit 3a1beabe115910d848c959268ae6d68b4da77fd7
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ipv6: Remove redundant unlikely() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 6 this patch: 6
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 6 this patch: 6
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 5 this patch: 5
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 3 this patch: 3
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-08--15-00 (tests: 773)

Commit Message

Tobias Klauser Oct. 8, 2024, 8:54 a.m. UTC
IS_ERR_OR_NULL() already implies unlikely().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 net/ipv6/ip6_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman Oct. 9, 2024, 12:04 p.m. UTC | #1
On Tue, Oct 08, 2024 at 10:54:54AM +0200, Tobias Klauser wrote:
> IS_ERR_OR_NULL() already implies unlikely().
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Looking at the implementation of IS_ERR_OR_NULL() I agree.

Reviewed-by: Simon Horman <horms@kernel.org>

...
patchwork-bot+netdevbpf@kernel.org Oct. 10, 2024, 2:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  8 Oct 2024 10:54:54 +0200 you wrote:
> IS_ERR_OR_NULL() already implies unlikely().
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  net/ipv6/ip6_output.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] ipv6: Remove redundant unlikely()
    https://git.kernel.org/netdev/net-next/c/3a1beabe1159

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 205673179b3c..f7b4608bb316 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -127,7 +127,7 @@  static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
 	nexthop = rt6_nexthop(dst_rt6_info(dst), daddr);
 	neigh = __ipv6_neigh_lookup_noref(dev, nexthop);
 
-	if (unlikely(IS_ERR_OR_NULL(neigh))) {
+	if (IS_ERR_OR_NULL(neigh)) {
 		if (unlikely(!neigh))
 			neigh = __neigh_create(&nd_tbl, nexthop, dev, false);
 		if (IS_ERR(neigh)) {