diff mbox

[net-next,1/3] bonding: remove the unnecessary struct bond_net

Message ID 1399434319-7300-2-git-send-email-dingtianhong@huawei.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Ding Tianhong May 7, 2014, 3:45 a.m. UTC
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(-)

Comments

Veaceslav Falico May 7, 2014, 1:26 p.m. UTC | #1
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;".

>+	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
>
>
--
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
Ding Tianhong May 7, 2014, 1:50 p.m. UTC | #2
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
>>
>>
> 
> .
> 


--
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
diff mbox

Patch

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 */
+	struct list_head	dev_list;
+#ifdef CONFIG_PROC_FS
+	struct proc_dir_entry *	proc_dir;
+#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);