From: Stephen Hemminger <shemminger@vyatta.com>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: [PATCH] bonding: simplify code and get rid of warning
Date: Mon, 18 Feb 2008 21:04:26 -0800 [thread overview]
Message-ID: <20080218210426.022bbe36@extreme> (raw)
Get rid of warning and simplify code that looks up vlan tag.
No need to get tag, then copy it. Also no need for a local status
variable.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Patch against current 2.6.25 version.
--- a/drivers/net/bonding/bond_alb.c 2008-02-18 20:58:53.000000000 -0800
+++ b/drivers/net/bonding/bond_alb.c 2008-02-18 21:01:10.000000000 -0800
@@ -678,12 +678,8 @@ static struct slave *rlb_choose_channel(
}
if (!list_empty(&bond->vlan_list)) {
- unsigned short vlan_id;
- int res = vlan_get_tag(skb, &vlan_id);
- if (!res) {
+ if (!vlan_get_tag(skb, &client_info->vlan_id))
client_info->tag = 1;
- client_info->vlan_id = vlan_id;
- }
}
if (!client_info->assigned) {
next reply other threads:[~2008-02-19 5:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 5:04 Stephen Hemminger [this message]
2008-02-20 16:57 ` [PATCH] bonding: simplify code and get rid of warning Jay Vosburgh
2008-02-20 17:24 ` Stephen Hemminger
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=20080218210426.022bbe36@extreme \
--to=shemminger@vyatta.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=fubar@us.ibm.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).