netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] team: Remove dead code
@ 2015-01-12  0:43 Kenneth Williams
  2015-01-12  7:10 ` Jiri Pirko
  2015-01-12 22:02 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Kenneth Williams @ 2015-01-12  0:43 UTC (permalink / raw)
  To: netdev; +Cc: jiri

The deleted lines are called from a function which is called:
1) Only through __team_options_register via team_options_register and
2) Only during initialization / mode initialization when there are no
ports attached.
Therefore the ports list is guarenteed to be empty and this code will
never be executed.

Signed-off-by: Kenneth Williams <ken@williamsclan.us>
---
 drivers/net/team/team.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 93e2242..43bcfff 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -176,7 +176,6 @@ static int __team_option_inst_add(struct team *team, struct team_option *option,
 static int __team_option_inst_add_option(struct team *team,
 					 struct team_option *option)
 {
-	struct team_port *port;
 	int err;
 
 	if (!option->per_port) {
@@ -184,12 +183,6 @@ static int __team_option_inst_add_option(struct team *team,
 		if (err)
 			goto inst_del_option;
 	}
-
-	list_for_each_entry(port, &team->port_list, list) {
-		err = __team_option_inst_add(team, option, port);
-		if (err)
-			goto inst_del_option;
-	}
 	return 0;
 
 inst_del_option:
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] team: Remove dead code
  2015-01-12  0:43 [PATCH] team: Remove dead code Kenneth Williams
@ 2015-01-12  7:10 ` Jiri Pirko
  2015-01-12 22:02 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2015-01-12  7:10 UTC (permalink / raw)
  To: Kenneth Williams; +Cc: netdev

Mon, Jan 12, 2015 at 01:43:54AM CET, ken@williamsclan.us wrote:
>The deleted lines are called from a function which is called:
>1) Only through __team_options_register via team_options_register and
>2) Only during initialization / mode initialization when there are no
>ports attached.
>Therefore the ports list is guarenteed to be empty and this code will
>never be executed.
>
>Signed-off-by: Kenneth Williams <ken@williamsclan.us>

Acked-by: Jiri Pirko <jiri@resnulli.us>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] team: Remove dead code
  2015-01-12  0:43 [PATCH] team: Remove dead code Kenneth Williams
  2015-01-12  7:10 ` Jiri Pirko
@ 2015-01-12 22:02 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-01-12 22:02 UTC (permalink / raw)
  To: ken; +Cc: netdev, jiri

From: Kenneth Williams <ken@williamsclan.us>
Date: Sun, 11 Jan 2015 16:43:54 -0800

> The deleted lines are called from a function which is called:
> 1) Only through __team_options_register via team_options_register and
> 2) Only during initialization / mode initialization when there are no
> ports attached.
> Therefore the ports list is guarenteed to be empty and this code will
> never be executed.
> 
> Signed-off-by: Kenneth Williams <ken@williamsclan.us>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-12 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12  0:43 [PATCH] team: Remove dead code Kenneth Williams
2015-01-12  7:10 ` Jiri Pirko
2015-01-12 22:02 ` David Miller

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).