From: Veaceslav Falico <vfalico@gmail.com>
To: netdev@vger.kernel.org
Cc: Veaceslav Falico <vfalico@gmail.com>,
Jay Vosburgh <j.vosburgh@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>
Subject: [PATCH net-next 2/2] bonding: remove NULL verification from bond_get_bond_by_slave()
Date: Wed, 21 May 2014 17:42:01 +0200 [thread overview]
Message-ID: <1400686921-5698-3-git-send-email-vfalico@gmail.com> (raw)
In-Reply-To: <1400686921-5698-1-git-send-email-vfalico@gmail.com>
Every caller relies on the result being the actual bond, so this
verification just masks the real problem.
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
---
drivers/net/bonding/bonding.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 44334b3d..dfc3779 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -249,8 +249,6 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond,
static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
{
- if (!slave || !slave->bond)
- return NULL;
return slave->bond;
}
--
1.8.4
next prev parent reply other threads:[~2014-05-21 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 15:41 [PATCH net-next 0/2] bonding: fix enslaving a dev without mtu setting support Veaceslav Falico
2014-05-21 15:42 ` [PATCH net-next 1/2] bonding: populate essential new_slave->bond/dev early Veaceslav Falico
2014-05-22 2:23 ` Ding Tianhong
2014-05-21 15:42 ` Veaceslav Falico [this message]
2014-05-22 19:47 ` [PATCH net-next 0/2] bonding: fix enslaving a dev without mtu setting support 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=1400686921-5698-3-git-send-email-vfalico@gmail.com \
--to=vfalico@gmail.com \
--cc=andy@greyhouse.net \
--cc=j.vosburgh@gmail.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).