Commit d8fb1648 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

bridge: use hlist_entry_safe

Use hlist_entry_safe() instead of open-coding it.

Signed-off-by: default avatarYueHaibing <>
Reviewed-by: default avatarNikolay Aleksandrov <>
Reviewed-by: default avatarStephen Hemminger <>
Signed-off-by: default avatarDavid S. Miller <>
parent 1e3ac201
......@@ -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) :
rport = hlist_entry_safe(rp, struct net_bridge_port, rlist);
if ((unsigned long)lport > (unsigned long)rport) {
port = lport;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment