summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2017-11-13 00:15:05 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-14 16:38:46 +0900
commit2c88b855981481970b731bf3f4508400aac429fb (patch)
treef57ca0d317160e303790cda0d027521ff15a8232 /net/core
parent51f299dd94bb1e28d03eefbc4fe0b9282f9ee2fa (diff)
downloadlinux-2c88b855981481970b731bf3f4508400aac429fb.tar.bz2
net: core: move dev_alloc_name_ns a little higher
No functional change. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1a5d31fdea27..4545685d2fa7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1107,6 +1107,19 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
return -ENFILE;
}
+static int dev_alloc_name_ns(struct net *net,
+ struct net_device *dev,
+ const char *name)
+{
+ char buf[IFNAMSIZ];
+ int ret;
+
+ ret = __dev_alloc_name(net, name, buf);
+ if (ret >= 0)
+ strlcpy(dev->name, buf, IFNAMSIZ);
+ return ret;
+}
+
/**
* dev_alloc_name - allocate a name for a device
* @dev: device
@@ -1136,19 +1149,6 @@ int dev_alloc_name(struct net_device *dev, const char *name)
}
EXPORT_SYMBOL(dev_alloc_name);
-static int dev_alloc_name_ns(struct net *net,
- struct net_device *dev,
- const char *name)
-{
- char buf[IFNAMSIZ];
- int ret;
-
- ret = __dev_alloc_name(net, name, buf);
- if (ret >= 0)
- strlcpy(dev->name, buf, IFNAMSIZ);
- return ret;
-}
-
int dev_get_valid_name(struct net *net, struct net_device *dev,
const char *name)
{