From: Ding Tianhong <dingtianhong@huawei•com>
To: Veaceslav Falico <vfalico@redhat•com>
Cc: <fubar@us•ibm.com>, <andy@greyhouse•net>, <davem@davemloft•net>,
<netdev@vger•kernel.org>
Subject: Re: [PATCH net-next 1/3] bonding: remove the unnecessary struct bond_net
Date: Wed, 7 May 2014 21:50:58 +0800 [thread overview]
Message-ID: <536A3A42.6030404@huawei.com> (raw)
In-Reply-To: <20140507132642.GP6295@redhat.com>
On 2014/5/7 21:26, Veaceslav Falico wrote:
> On Wed, May 07, 2014 at 11:45:17AM +0800, Ding Tianhong wrote:
>> Move the structure bond_net forward, and remove the unnecessary structure declaration.
>>
>> Cc: Ding Tianhong <dingtianhong@huawei•com>
>> Cc: Jay Vosburgh <fubar@us•ibm.com>
>> Cc: Andy Gospodarek <andy@greyhouse•net>
>> Signed-off-by: Ding Tianhong <dingtianhong@huawei•com>
>> ---
>> drivers/net/bonding/bonding.h | 18 ++++++++----------
>> 1 file changed, 8 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
>> index b8bdd0a..9f23bf3 100644
>> --- a/drivers/net/bonding/bonding.h
>> +++ b/drivers/net/bonding/bonding.h
>> @@ -487,7 +487,14 @@ static inline bool slave_can_tx(struct slave *slave)
>> return false;
>> }
>>
>> -struct bond_net;
>> +struct bond_net {
>> + struct net * net; /* Associated network namespace */
>
> You might as well clean this up to look like "foo *bar;".
>
Yes, thanks for your piercing eyes, I need to be more careful.
Ding
>> + struct list_head dev_list;
>> +#ifdef CONFIG_PROC_FS
>> + struct proc_dir_entry * proc_dir;
>
> Ditto.
>
>> +#endif
>> + struct class_attribute class_attr_bonding_masters;
>> +};
>>
>> int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave);
>> void bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
>> @@ -516,15 +523,6 @@ struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond);
>> struct net_device *bond_option_active_slave_get(struct bonding *bond);
>> const char *bond_slave_link_status(s8 link);
>>
>> -struct bond_net {
>> - struct net * net; /* Associated network namespace */
>> - struct list_head dev_list;
>> -#ifdef CONFIG_PROC_FS
>> - struct proc_dir_entry * proc_dir;
>> -#endif
>> - struct class_attribute class_attr_bonding_masters;
>> -};
>> -
>> #ifdef CONFIG_PROC_FS
>> void bond_create_proc_entry(struct bonding *bond);
>> void bond_remove_proc_entry(struct bonding *bond);
>> --
>> 1.8.0
>>
>>
>
> .
>
next prev parent reply other threads:[~2014-05-07 13:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 3:45 [PATCH net-next 0/3] bonding: slight optimization and cleanup Ding Tianhong
2014-05-07 3:45 ` [PATCH net-next 1/3] bonding: remove the unnecessary struct bond_net Ding Tianhong
2014-05-07 13:26 ` Veaceslav Falico
2014-05-07 13:50 ` Ding Tianhong [this message]
2014-05-07 3:45 ` [PATCH net-next 2/3] bonding: simplify the slave_do_arp_validate_only() Ding Tianhong
2014-05-07 3:45 ` [PATCH net-next 3/3] bonding: remove the unused macro Ding Tianhong
2014-05-07 13:27 ` [PATCH net-next 0/3] bonding: slight optimization and cleanup Veaceslav Falico
2014-05-07 13:34 ` Veaceslav Falico
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=536A3A42.6030404@huawei.com \
--to=dingtianhong@huawei$(echo .)com \
--cc=andy@greyhouse$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=fubar@us$(echo .)ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=vfalico@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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