Skip to contentSkip to conversation

netdevsim: fib: Remove redundant code

PATCH Applied Jiapeng Chong 3 participants 3 messages Mar 11, 2021 – Mar 12, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 netdevsim: fib: Remove redundant code

Fix the following coccicheck warnings:

./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return "0" on line 889.

---
Changes in v2:
- Modify the function type to void.

 drivers/net/netdevsim/fib.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/netdevsim/fib.c +1 -5
index 46fb414..3ca0f54 100644
@@ -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,
Signature · 1 line
1.8.3.1
#2 lore raw
In reply to Jiapeng Chong
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

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

Quoted 9 lines · 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.

[...]

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