* [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
@ 2021-01-22 9:32 Jiapeng Zhong
2021-01-22 17:33 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Jiapeng Zhong @ 2021-01-22 9:32 UTC (permalink / raw)
To: roopa
Cc: nikolay, davem, kuba, natechancellor, ndesaulniers, bridge,
linux-kernel, clang-built-linux, Jiapeng Zhong
coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.
Fix the following coccicheck warnings:
./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
used.
Reported-by: Abaci <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
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 257ac4e..2229d10 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1292,7 +1292,7 @@ static int br_multicast_add_group(struct net_bridge *br,
pg = __br_multicast_add_group(br, port, group, src, filter_mode,
igmpv2_mldv1, false);
/* NULL is considered valid for host joined groups */
- err = IS_ERR(pg) ? PTR_ERR(pg) : 0;
+ err = PTR_ERR_OR_ZERO(pg);
spin_unlock(&br->multicast_lock);
return err;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
2021-01-22 9:32 [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR Jiapeng Zhong
@ 2021-01-22 17:33 ` Jakub Kicinski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-01-22 17:33 UTC (permalink / raw)
To: Jiapeng Zhong
Cc: roopa, nikolay, davem, natechancellor, ndesaulniers, bridge,
linux-kernel, clang-built-linux
On Fri, 22 Jan 2021 17:32:13 +0800 Jiapeng Zhong wrote:
> coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.
>
> Fix the following coccicheck warnings:
>
> ./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
> used.
>
> Reported-by: Abaci <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
You need to CC netdev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
2021-01-25 2:39 Jiapeng Zhong
2021-01-25 8:23 ` Nikolay Aleksandrov
@ 2021-01-26 3:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-26 3:20 UTC (permalink / raw)
To: Jiapeng Zhong
Cc: roopa, nikolay, davem, kuba, natechancellor, ndesaulniers,
bridge, netdev, linux-kernel, clang-built-linux
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Mon, 25 Jan 2021 10:39:41 +0800 you wrote:
> coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.
>
> Fix the following coccicheck warnings:
>
> ./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
> used.
>
> [...]
Here is the summary with links:
- bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
https://git.kernel.org/netdev/net-next/c/8d21c882aba8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
2021-01-25 8:23 ` Nikolay Aleksandrov
@ 2021-01-26 2:33 ` Jakub Kicinski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-01-26 2:33 UTC (permalink / raw)
To: Nikolay Aleksandrov, Jiapeng Zhong
Cc: roopa, davem, natechancellor, ndesaulniers, bridge, netdev,
linux-kernel, clang-built-linux
On Mon, 25 Jan 2021 10:23:00 +0200 Nikolay Aleksandrov wrote:
> On 25/01/2021 04:39, Jiapeng Zhong wrote:
> > coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.
> >
> > Fix the following coccicheck warnings:
> >
> > ./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
> > used.
> >
> > Reported-by: Abaci <abaci@linux.alibaba.com>
> > Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> > ---
> > 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 257ac4e..2229d10 100644
> > --- a/net/bridge/br_multicast.c
> > +++ b/net/bridge/br_multicast.c
> > @@ -1292,7 +1292,7 @@ static int br_multicast_add_group(struct net_bridge *br,
> > pg = __br_multicast_add_group(br, port, group, src, filter_mode,
> > igmpv2_mldv1, false);
> > /* NULL is considered valid for host joined groups */
> > - err = IS_ERR(pg) ? PTR_ERR(pg) : 0;
> > + err = PTR_ERR_OR_ZERO(pg);
> > spin_unlock(&br->multicast_lock);
> >
> > return err;
> >
>
> This should be targeted at net-next.
> Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
2021-01-25 2:39 Jiapeng Zhong
@ 2021-01-25 8:23 ` Nikolay Aleksandrov
2021-01-26 2:33 ` Jakub Kicinski
2021-01-26 3:20 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 6+ messages in thread
From: Nikolay Aleksandrov @ 2021-01-25 8:23 UTC (permalink / raw)
To: Jiapeng Zhong, roopa
Cc: davem, kuba, natechancellor, ndesaulniers, bridge, netdev,
linux-kernel, clang-built-linux
On 25/01/2021 04:39, Jiapeng Zhong wrote:
> coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.
>
> Fix the following coccicheck warnings:
>
> ./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
> used.
>
> Reported-by: Abaci <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> ---
> 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 257ac4e..2229d10 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1292,7 +1292,7 @@ static int br_multicast_add_group(struct net_bridge *br,
> pg = __br_multicast_add_group(br, port, group, src, filter_mode,
> igmpv2_mldv1, false);
> /* NULL is considered valid for host joined groups */
> - err = IS_ERR(pg) ? PTR_ERR(pg) : 0;
> + err = PTR_ERR_OR_ZERO(pg);
> spin_unlock(&br->multicast_lock);
>
> return err;
>
This should be targeted at net-next.
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR
@ 2021-01-25 2:39 Jiapeng Zhong
2021-01-25 8:23 ` Nikolay Aleksandrov
2021-01-26 3:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Jiapeng Zhong @ 2021-01-25 2:39 UTC (permalink / raw)
To: roopa
Cc: nikolay, davem, kuba, natechancellor, ndesaulniers, bridge,
netdev, linux-kernel, clang-built-linux, Jiapeng Zhong
coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.
Fix the following coccicheck warnings:
./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
used.
Reported-by: Abaci <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
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 257ac4e..2229d10 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1292,7 +1292,7 @@ static int br_multicast_add_group(struct net_bridge *br,
pg = __br_multicast_add_group(br, port, group, src, filter_mode,
igmpv2_mldv1, false);
/* NULL is considered valid for host joined groups */
- err = IS_ERR(pg) ? PTR_ERR(pg) : 0;
+ err = PTR_ERR_OR_ZERO(pg);
spin_unlock(&br->multicast_lock);
return err;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-26 10:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 9:32 [PATCH] bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR Jiapeng Zhong
2021-01-22 17:33 ` Jakub Kicinski
2021-01-25 2:39 Jiapeng Zhong
2021-01-25 8:23 ` Nikolay Aleksandrov
2021-01-26 2:33 ` Jakub Kicinski
2021-01-26 3:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).