From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: YueHaibing <yuehaibing@huawei.com>,
stephen@networkplumber.org, davem@davemloft.net
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Subject: Re: [PATCH net-next] bridge: use hlist_entry_safe
Date: Thu, 26 Apr 2018 17:44:09 +0300 [thread overview]
Message-ID: <426b1ae6-9fd8-a07b-790e-d01eb25a3990@cumulusnetworks.com> (raw)
In-Reply-To: <20180426030705.6632-1-yuehaibing@huawei.com>
On 26/04/18 06:07, YueHaibing wrote:
> Use hlist_entry_safe() instead of open-coding it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> 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;
> - 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;
>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
WARNING: multiple messages have this Message-ID (diff)
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: YueHaibing <yuehaibing@huawei.com>,
stephen@networkplumber.org, davem@davemloft.net
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Subject: Re: [Bridge] [PATCH net-next] bridge: use hlist_entry_safe
Date: Thu, 26 Apr 2018 17:44:09 +0300 [thread overview]
Message-ID: <426b1ae6-9fd8-a07b-790e-d01eb25a3990@cumulusnetworks.com> (raw)
In-Reply-To: <20180426030705.6632-1-yuehaibing@huawei.com>
On 26/04/18 06:07, YueHaibing wrote:
> Use hlist_entry_safe() instead of open-coding it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> 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;
> - 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;
>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
next prev parent reply other threads:[~2018-04-26 14:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 3:07 [PATCH net-next] bridge: use hlist_entry_safe YueHaibing
2018-04-26 3:07 ` [Bridge] " YueHaibing
2018-04-26 14:44 ` Nikolay Aleksandrov [this message]
2018-04-26 14:44 ` Nikolay Aleksandrov
2018-04-26 15:54 ` Stephen Hemminger
2018-04-26 15:54 ` [Bridge] " Stephen Hemminger
2018-04-27 17:21 ` David Miller
2018-04-27 17:21 ` [Bridge] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=426b1ae6-9fd8-a07b-790e-d01eb25a3990@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.