diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-04-26 11:07:05 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-27 13:20:48 -0400 |
commit | d8fb1648fcf2d5ded71239fc16d69c447af6f814 (patch) | |
tree | 8e359212c6c7d7f45dd163488032941fc6b7dc78 /net/bridge/br_forward.c | |
parent | 1e3ac2012d727b42066df18eba472d47aaea9379 (diff) | |
download | lwn-d8fb1648fcf2d5ded71239fc16d69c447af6f814.tar.gz lwn-d8fb1648fcf2d5ded71239fc16d69c447af6f814.zip |
bridge: use hlist_entry_safe
Use hlist_entry_safe() instead of open-coding it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_forward.c')
-rw-r--r-- | net/bridge/br_forward.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index b4eed113d2ec..7a7fd672ccf2 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; - rport = rp ? hlist_entry(rp, struct net_bridge_port, rlist) : - NULL; + rport = hlist_entry_safe(rp, struct net_bridge_port, rlist); if ((unsigned long)lport > (unsigned long)rport) { port = lport; |