From: Stephen Hemminger <stephen@networkplumber.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] net: core: devname allocation cleanups
Date: Sun, 12 Nov 2017 16:12:05 -0800 [thread overview]
Message-ID: <20171112161205.43e0951b@xeon-e3> (raw)
In-Reply-To: <20171112231511.4666-1-linux@rasmusvillemoes.dk>
On Mon, 13 Nov 2017 00:15:03 +0100
Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> It's somewhat confusing to have both dev_alloc_name and
> dev_get_valid_name. I can't see why the former is less strict than the
> latter, so make them (or rather dev_alloc_name_ns and
> dev_get_valid_name) equivalent, hardening dev_alloc_name() a little.
>
> Obvious follow-up patches would be to only export one function, and
> make dev_alloc_name a static inline wrapper for that (whichever name
> is chosen for the exported interface). But maybe there is a good
> reason the two exported interfaces do different checking, so I'll
> refrain from including the trivial but tree-wide renaming in this
> series.
>
> Rasmus Villemoes (7):
> net: core: improve sanity checking in __dev_alloc_name
> net: core: move dev_alloc_name_ns a little higher
> net: core: eliminate dev_alloc_name{,_ns} code duplication
> net: core: drop pointless check in __dev_alloc_name
> net: core: check dev_valid_name in __dev_alloc_name
> net: core: maybe return -EEXIST in __dev_alloc_name
> net: core: dev_get_valid_name is now the same as dev_alloc_name_ns
>
> net/core/dev.c | 62 +++++++++++++++++++++-------------------------------------
> 1 file changed, 22 insertions(+), 40 deletions(-)
>
Looks good to me. Can't see anything obviously wrong with this.
I think the two functions started out heading in different directions.
next prev parent reply other threads:[~2017-11-13 0:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-12 23:15 [PATCH 0/7] net: core: devname allocation cleanups Rasmus Villemoes
2017-11-12 23:15 ` [PATCH 1/7] net: core: improve sanity checking in __dev_alloc_name Rasmus Villemoes
2017-11-12 23:15 ` [PATCH 2/7] net: core: move dev_alloc_name_ns a little higher Rasmus Villemoes
2017-11-12 23:15 ` [PATCH 3/7] net: core: eliminate dev_alloc_name{,_ns} code duplication Rasmus Villemoes
2017-11-20 14:26 ` David Laight
2017-11-12 23:15 ` [PATCH 4/7] net: core: drop pointless check in __dev_alloc_name Rasmus Villemoes
2017-11-12 23:15 ` [PATCH 5/7] net: core: check dev_valid_name " Rasmus Villemoes
2017-11-12 23:15 ` [PATCH 6/7] net: core: maybe return -EEXIST " Rasmus Villemoes
2017-11-13 0:03 ` Stephen Hemminger
2017-11-12 23:15 ` [PATCH 7/7] net: core: dev_get_valid_name is now the same as dev_alloc_name_ns Rasmus Villemoes
2017-11-13 0:12 ` Stephen Hemminger [this message]
2017-11-14 7:39 ` [PATCH 0/7] net: core: devname allocation cleanups David Miller
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=20171112161205.43e0951b@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--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 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).