From: Jay Vosburgh <fubar@us.ibm.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: bonding-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH] bonding: simplify code and get rid of warning
Date: Wed, 20 Feb 2008 08:57:56 -0800 [thread overview]
Message-ID: <21522.1203526676@death> (raw)
In-Reply-To: <20080218210426.022bbe36@extreme>
Stephen Hemminger <shemminger@vyatta.com> wrote:
>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.
Granted, the current code is suboptimal, but I don't see any
warnings compiling this (gcc 4.1.2). What are you getting?
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
>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) {
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-02-20 16:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 5:04 [PATCH] bonding: simplify code and get rid of warning Stephen Hemminger
2008-02-20 16:57 ` Jay Vosburgh [this message]
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=21522.1203526676@death \
--to=fubar@us.ibm.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).