[PATCH] net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

Subsystems: ethernet bridge, networking [general], the rest

STALE2007d LANDED

Landed in mainline as 1697291dae7c on 2021-02-06.

2 messages, 2 authors, 2021-02-06 · open the first message on its own page

[PATCH] net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

From: Xu Wang <hidden>
Date: 2021-02-04 07:06:56

Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).

net/bridge/br_multicast.c:1246:9-16: WARNING: ERR_CAST can be used with mp
Generated by: scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Xu Wang <redacted>
---
 net/bridge/br_multicast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 257ac4e25f6d..dfbb4dd01fa9 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1243,7 +1243,7 @@ __br_multicast_add_group(struct net_bridge *br,
 
 	mp = br_multicast_new_group(br, group);
 	if (IS_ERR(mp))
-		return ERR_PTR(PTR_ERR(mp));
+		return ERR_CAST(mp);
 
 	if (!port) {
 		br_multicast_host_join(mp, true);
-- 
2.17.1

Re: [PATCH] net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-02-06 19:21:47

Hello:

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

On Thu,  4 Feb 2021 07:05:49 +0000 you wrote:
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).

net/bridge/br_multicast.c:1246:9-16: WARNING: ERR_CAST can be used with mp
Generated by: scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Xu Wang <redacted>

[...]
Here is the summary with links:
  - net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
    https://git.kernel.org/netdev/net-next/c/1697291dae7c

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help