Discussion:
[Bridge] [PATCH net-next] bridge: use hlist_entry_safe
Nikolay Aleksandrov
2018-04-26 14:44:09 UTC
Permalink
Use hlist_entry_safe() instead of open-coding it.
---
net/bridge/br_forward.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index b4eed11..7a7fd67 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -274,8 +274,7 @@ void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
struct net_bridge_port *port, *lport, *rport;
lport = p ? p->port : NULL;
- NULL;
+ rport = hlist_entry_safe(rp, struct net_bridge_port, rlist);
if ((unsigned long)lport > (unsigned long)rport) {
port = lport;
Reviewed-by: Nikolay Aleksandrov <***@cumulusnetworks.com>
Stephen Hemminger
2018-04-26 15:54:13 UTC
Permalink
On Thu, 26 Apr 2018 11:07:05 +0800
Use hlist_entry_safe() instead of open-coding it.
---
net/bridge/br_forward.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index b4eed11..7a7fd67 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -274,8 +274,7 @@ void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
struct net_bridge_port *port, *lport, *rport;
lport = p ? p->port : NULL;
- NULL;
+ rport = hlist_entry_safe(rp, struct net_bridge_port, rlist);
if ((unsigned long)lport > (unsigned long)rport) {
port = lport;

Reviewed-by: Stephen Hemminger <***@networkplumber.org>
David Miller
2018-04-27 17:21:01 UTC
Permalink
From: YueHaibing <***@huawei.com>
Date: Thu, 26 Apr 2018 11:07:05 +0800
Use hlist_entry_safe() instead of open-coding it.
Applied, thanks.

Loading...