All of lore.kernel.org
 help / color / mirror / Atom feed
From: FNST-Wang Chen <wangchen@cn.fujitsu.com>
To: netdev@vger.kernel.org
Cc: Wang Chen <ellre923@gmail.com>
Subject: [PATCH 1/1] netcore: minor cleanup for register_netdevice
Date: Thu, 06 Sep 2007 13:27:24 +0800	[thread overview]
Message-ID: <46DF8FBC.20106@cn.fujitsu.com> (raw)

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






             reply	other threads:[~2007-09-06  5:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-06  5:27 FNST-Wang Chen [this message]
2007-09-06  5:34 ` [PATCH 1/1] netcore: minor cleanup for register_netdevice YOSHIFUJI Hideaki / 吉藤英明
2007-09-06  5:37   ` [Spam-fortigate] " FNST-Wang Chen
2007-09-06  5:37 ` Krishna Kumar2

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=46DF8FBC.20106@cn.fujitsu.com \
    --to=wangchen@cn.fujitsu.com \
    --cc=ellre923@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.