From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, sfeldma@cumulusnetworks.com,
nicolas.dichtel@6wind.com, john.r.fastabend@intel.com,
vyasevich@gmail.com
Subject: [patch net-next] rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
Date: Thu, 23 Jan 2014 19:19:21 +0100 [thread overview]
Message-ID: <1390501161-7890-1-git-send-email-jiri@resnulli.us> (raw)
This check is not needed because the same check is done before
fill_slave_info is used in rtnl_link_slave_info_fill.
Also, by removing this check, kernel will fillup IFLA_INFO_SLAVE_KIND
even for slaves of masters which does not implement fill_slave_info.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
net/core/rtnetlink.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index db6a239..393b1bc 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -482,8 +482,7 @@ static bool rtnl_have_link_slave_info(const struct net_device *dev)
struct net_device *master_dev;
master_dev = netdev_master_upper_dev_get((struct net_device *) dev);
- if (master_dev && master_dev->rtnl_link_ops &&
- master_dev->rtnl_link_ops->fill_slave_info)
+ if (master_dev && master_dev->rtnl_link_ops)
return true;
return false;
}
--
1.8.3.1
next reply other threads:[~2014-01-23 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 18:19 Jiri Pirko [this message]
2014-01-24 0:22 ` [patch net-next] rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info 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=1390501161-7890-1-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=sfeldma@cumulusnetworks.com \
--cc=vyasevich@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox