diff options
Diffstat (limited to 'include/linux/if_team.h')
-rw-r--r-- | include/linux/if_team.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 4648d8021244..cfd21e3d5506 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
@@ -216,11 +216,10 @@ static inline struct hlist_head *team_port_index_hash(struct team *team, | |||
216 | static inline struct team_port *team_get_port_by_index(struct team *team, | 216 | static inline struct team_port *team_get_port_by_index(struct team *team, |
217 | int port_index) | 217 | int port_index) |
218 | { | 218 | { |
219 | struct hlist_node *p; | ||
220 | struct team_port *port; | 219 | struct team_port *port; |
221 | struct hlist_head *head = team_port_index_hash(team, port_index); | 220 | struct hlist_head *head = team_port_index_hash(team, port_index); |
222 | 221 | ||
223 | hlist_for_each_entry(port, p, head, hlist) | 222 | hlist_for_each_entry(port, head, hlist) |
224 | if (port->index == port_index) | 223 | if (port->index == port_index) |
225 | return port; | 224 | return port; |
226 | return NULL; | 225 | return NULL; |
@@ -228,11 +227,10 @@ static inline struct team_port *team_get_port_by_index(struct team *team, | |||
228 | static inline struct team_port *team_get_port_by_index_rcu(struct team *team, | 227 | static inline struct team_port *team_get_port_by_index_rcu(struct team *team, |
229 | int port_index) | 228 | int port_index) |
230 | { | 229 | { |
231 | struct hlist_node *p; | ||
232 | struct team_port *port; | 230 | struct team_port *port; |
233 | struct hlist_head *head = team_port_index_hash(team, port_index); | 231 | struct hlist_head *head = team_port_index_hash(team, port_index); |
234 | 232 | ||
235 | hlist_for_each_entry_rcu(port, p, head, hlist) | 233 | hlist_for_each_entry_rcu(port, head, hlist) |
236 | if (port->index == port_index) | 234 | if (port->index == port_index) |
237 | return port; | 235 | return port; |
238 | return NULL; | 236 | return NULL; |