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>
This commit is contained in:
parent
1e3ac2012d
commit
d8fb1648fc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue