* [PATCH v2] netdevsim: fib: Remove redundant code
@ 2021-03-11 7:11 Jiapeng Chong
2021-03-11 20:38 ` Jakub Kicinski
2021-03-12 0:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-03-11 7:11 UTC (permalink / raw)
To: kuba; +Cc: davem, netdev, linux-kernel, Jiapeng Chong
Fix the following coccicheck warnings:
./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return
"0" on line 889.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
- Modify the function type to void.
drivers/net/netdevsim/fib.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c
index 46fb414..3ca0f54 100644
--- a/drivers/net/netdevsim/fib.c
+++ b/drivers/net/netdevsim/fib.c
@@ -869,10 +869,8 @@ static int nsim_fib6_event(struct nsim_fib_data *data,
return err;
}
-static int nsim_fib_event(struct nsim_fib_event *fib_event)
+static void nsim_fib_event(struct nsim_fib_event *fib_event)
{
- int err = 0;
-
switch (fib_event->family) {
case AF_INET:
nsim_fib4_event(fib_event->data, &fib_event->fen_info,
@@ -885,8 +883,6 @@ static int nsim_fib_event(struct nsim_fib_event *fib_event)
nsim_fib6_event_fini(&fib_event->fib6_event);
break;
}
-
- return err;
}
static int nsim_fib4_prepare_event(struct fib_notifier_info *info,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] netdevsim: fib: Remove redundant code
2021-03-11 7:11 [PATCH v2] netdevsim: fib: Remove redundant code Jiapeng Chong
@ 2021-03-11 20:38 ` Jakub Kicinski
2021-03-12 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-03-11 20:38 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: davem, netdev, linux-kernel
On Thu, 11 Mar 2021 15:11:01 +0800 Jiapeng Chong wrote:
> Fix the following coccicheck warnings:
>
> ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return
> "0" on line 889.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] netdevsim: fib: Remove redundant code
2021-03-11 7:11 [PATCH v2] netdevsim: fib: Remove redundant code Jiapeng Chong
2021-03-11 20:38 ` Jakub Kicinski
@ 2021-03-12 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-12 0:10 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: kuba, davem, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 11 Mar 2021 15:11:01 +0800 you wrote:
> Fix the following coccicheck warnings:
>
> ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return
> "0" on line 889.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
>
> [...]
Here is the summary with links:
- [v2] netdevsim: fib: Remove redundant code
https://git.kernel.org/netdev/net-next/c/c53d21af674a
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] 3+ messages in thread
end of thread, other threads:[~2021-03-12 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 7:11 [PATCH v2] netdevsim: fib: Remove redundant code Jiapeng Chong
2021-03-11 20:38 ` Jakub Kicinski
2021-03-12 0:10 ` 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).