netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] netcore: minor cleanup for register_netdevice
@ 2007-09-06  5:27 FNST-Wang Chen
  2007-09-06  5:34 ` YOSHIFUJI Hideaki / 吉藤英明
  2007-09-06  5:37 ` Krishna Kumar2
  0 siblings, 2 replies; 4+ messages in thread
From: FNST-Wang Chen @ 2007-09-06  5:27 UTC (permalink / raw)
  To: netdev; +Cc: Wang Chen

- minor logic cleanup

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>

diff -Nurp linux-2.6.22.4.org/net/core/dev.c  linux-2.6.22.4/net/core/dev.c
--- linux-2.6.22.4.org/net/core/dev.c    2007-08-22 15:33:40.000000000 
+0800
+++ linux-2.6.22.4/net/core/dev.c    2007-09-06 13:27:35.000000000 +0800
@@ -3075,8 +3075,6 @@ int register_netdevice(struct net_device
    dev->xmit_lock_owner = -1;
    spin_lock_init(&dev->ingress_lock);

-    dev->iflink = -1;
-
    /* Init, if this function is available */
    if (dev->init) {
        ret = dev->init(dev);
@@ -3093,8 +3091,7 @@ int register_netdevice(struct net_device
    }

    dev->ifindex = dev_new_index();
-    if (dev->iflink == -1)
-        dev->iflink = dev->ifindex;
+    dev->iflink = dev->ifindex;

    /* Check for existence of name */
    head = dev_name_hash(dev->name);






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] netcore: minor cleanup for register_netdevice
  2007-09-06  5:27 [PATCH 1/1] netcore: minor cleanup for register_netdevice FNST-Wang Chen
@ 2007-09-06  5:34 ` YOSHIFUJI Hideaki / 吉藤英明
  2007-09-06  5:37   ` [Spam-fortigate] " FNST-Wang Chen
  2007-09-06  5:37 ` Krishna Kumar2
  1 sibling, 1 reply; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-09-06  5:34 UTC (permalink / raw)
  To: wangchen; +Cc: netdev, ellre923, yoshfuji

I disagree.  Some of "dev->init()" functions set up dev->iflink;
e.g., ipip_tunnel_init() etc.

In article <46DF8FBC.20106@cn.fujitsu.com> (at Thu, 06 Sep 2007 13:27:24 +0800), FNST-Wang Chen <wangchen@cn.fujitsu.com> says:

> - minor logic cleanup
> 
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> 
> diff -Nurp linux-2.6.22.4.org/net/core/dev.c  linux-2.6.22.4/net/core/dev.c
> --- linux-2.6.22.4.org/net/core/dev.c    2007-08-22 15:33:40.000000000 
> +0800
> +++ linux-2.6.22.4/net/core/dev.c    2007-09-06 13:27:35.000000000 +0800
> @@ -3075,8 +3075,6 @@ int register_netdevice(struct net_device
>     dev->xmit_lock_owner = -1;
>     spin_lock_init(&dev->ingress_lock);
> 
> -    dev->iflink = -1;
> -
>     /* Init, if this function is available */
>     if (dev->init) {
>         ret = dev->init(dev);
> @@ -3093,8 +3091,7 @@ int register_netdevice(struct net_device
>     }
> 
>     dev->ifindex = dev_new_index();
> -    if (dev->iflink == -1)
> -        dev->iflink = dev->ifindex;
> +    dev->iflink = dev->ifindex;
> 
>     /* Check for existence of name */
>     head = dev_name_hash(dev->name);
> 
> 
> 
> 
> 
> -
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] netcore: minor cleanup for register_netdevice
  2007-09-06  5:27 [PATCH 1/1] netcore: minor cleanup for register_netdevice FNST-Wang Chen
  2007-09-06  5:34 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-09-06  5:37 ` Krishna Kumar2
  1 sibling, 0 replies; 4+ messages in thread
From: Krishna Kumar2 @ 2007-09-06  5:37 UTC (permalink / raw)
  To: FNST-Wang Chen; +Cc: Wang Chen, netdev, netdev-owner

Some init handlers set iflink, and hence it is required. See tunnel init
routines (ipip_tunnel_init), macvlan_init(), etc

netdev-owner@vger.kernel.org wrote on 09/06/2007 10:57:24 AM:

> - minor logic cleanup
>
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
>
> diff -Nurp linux-2.6.22.4.org/net/core/dev.c  linux-2.6.22.4
/net/core/dev.c
> --- linux-2.6.22.4.org/net/core/dev.c    2007-08-22 15:33:40.000000000
> +0800
> +++ linux-2.6.22.4/net/core/dev.c    2007-09-06 13:27:35.000000000 +0800
> @@ -3075,8 +3075,6 @@ int register_netdevice(struct net_device
>     dev->xmit_lock_owner = -1;
>     spin_lock_init(&dev->ingress_lock);
>
> -    dev->iflink = -1;
> -
>     /* Init, if this function is available */
>     if (dev->init) {
>         ret = dev->init(dev);
> @@ -3093,8 +3091,7 @@ int register_netdevice(struct net_device
>     }
>
>     dev->ifindex = dev_new_index();
> -    if (dev->iflink == -1)
> -        dev->iflink = dev->ifindex;
> +    dev->iflink = dev->ifindex;
>
>     /* Check for existence of name */
>     head = dev_name_hash(dev->name);
>
>
>
>
>
> -
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Spam-fortigate] Re: [PATCH 1/1] netcore: minor cleanup for register_netdevice
  2007-09-06  5:34 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-09-06  5:37   ` FNST-Wang Chen
  0 siblings, 0 replies; 4+ messages in thread
From: FNST-Wang Chen @ 2007-09-06  5:37 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: netdev, ellre923, krkumar2

oops
i am wrong

YOSHIFUJI Hideaki / 吉藤英明 said the following on 2007-9-6 13:34:
> I disagree.  Some of "dev->init()" functions set up dev->iflink;
> e.g., ipip_tunnel_init() etc.
>
> In article <46DF8FBC.20106@cn.fujitsu.com> (at Thu, 06 Sep 2007 13:27:24 +0800), FNST-Wang Chen <wangchen@cn.fujitsu.com> says:
>
>   
>> - minor logic cleanup
>>
>> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
>>
>> diff -Nurp linux-2.6.22.4.org/net/core/dev.c  linux-2.6.22.4/net/core/dev.c
>> --- linux-2.6.22.4.org/net/core/dev.c    2007-08-22 15:33:40.000000000 
>> +0800
>> +++ linux-2.6.22.4/net/core/dev.c    2007-09-06 13:27:35.000000000 +0800
>> @@ -3075,8 +3075,6 @@ int register_netdevice(struct net_device
>>     dev->xmit_lock_owner = -1;
>>     spin_lock_init(&dev->ingress_lock);
>>
>> -    dev->iflink = -1;
>> -
>>     /* Init, if this function is available */
>>     if (dev->init) {
>>         ret = dev->init(dev);
>> @@ -3093,8 +3091,7 @@ int register_netdevice(struct net_device
>>     }
>>
>>     dev->ifindex = dev_new_index();
>> -    if (dev->iflink == -1)
>> -        dev->iflink = dev->ifindex;
>> +    dev->iflink = dev->ifindex;
>>
>>     /* Check for existence of name */
>>     head = dev_name_hash(dev->name);
>>
>>
>>
>>
>>
>> -
>> 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
>>     
>
>
>
>   


-- 
Best Regards,
A new email address of FJWAN is launched from Apr.1 2007.
The updated address is: wangchen@cn.fujitsu.com
--------------------------------------------------
Wang Chen
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
8/F., Civil Defense Building, No.189 Guangzhou Road,
Nanjing, 210029, China
TEL:+86+25-86630566-850
FUJITSU INTERNAL:79955-850
FAX:+86+25-83317685
MAIL:wangchen@cn.fujitsu.com
--------------------------------------------------




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-06  5:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06  5:27 [PATCH 1/1] netcore: minor cleanup for register_netdevice FNST-Wang Chen
2007-09-06  5:34 ` YOSHIFUJI Hideaki / 吉藤英明
2007-09-06  5:37   ` [Spam-fortigate] " FNST-Wang Chen
2007-09-06  5:37 ` Krishna Kumar2

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).