Re: [PATCH v8 4/4] net: rtnetlink - make create_link take name_assign_type

From: David Miller
Date: Fri Jul 11 2014 - 15:23:39 EST


From: Tom Gundersen <teg@xxxxxxx>
Date: Thu, 10 Jul 2014 23:01:06 +0200

> This passes down NET_NAME_USER (or NET_NAME_ENUM) to alloc_netdev(),
> for any device created over rtnetlink.
>
> Signed-off-by: Tom Gundersen <teg@xxxxxxx>
> ---
> drivers/net/veth.c | 11 ++++++++---
> include/net/rtnetlink.h | 1 +
> net/core/rtnetlink.c | 12 ++++++++----
> 3 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index b4a10bc..5058700 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -319,6 +319,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
> struct nlattr *peer_tb[IFLA_MAX + 1], **tbp;
> struct ifinfomsg *ifmp;
> struct net *net;
> + unsigned char name_assign_type;
>
> /*
> * create and register peer first

Please order local variables in reverse-christmas-tree order, in this case
name_assign_type should be placed on the line before the declaration for
"ifmp".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/