From: "Yajun Deng" <yajun.deng@linux.dev>
To: "Jakub Kicinski" <kuba@kernel.org>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: core: Remove the dup_errno parameter in dev_prep_valid_name()
Date: Wed, 19 Jun 2024 01:55:00 +0000 [thread overview]
Message-ID: <077a532cb112d296b6cfb7692ed25bf9dd64f199@linux.dev> (raw)
In-Reply-To: <20240618074840.536600bb@kernel.org>
June 18, 2024 at 10:48 PM, "Jakub Kicinski" <kuba@kernel.org> wrote:
>
> On Tue, 18 Jun 2024 21:17:43 +0800 Yajun Deng wrote:
>
> >
> > netdev_name_in_use() return -EEXIST makes more sense if it's not NULL.
> >
>
> netdev_name_in_use() returns bool.
>
I should say the netdev_name_in_use() in dev_prep_valid_name() return -EEXIST.
> >
> > But dev_alloc_name() should keep the -ENFILE errno.
> >
>
> And it does.
>
> I don't understand what problem you're trying to fix.
>
> The code is fine as is.
>
This is not a fix.
There are three callers to dev_prep_valid_name(), only dev_alloc_name() needs
to replace -EEXIST with -ENFILE. We shouldn't add an extra parameter for this,
because it's not necessary for the other callers.
If we do it in dev_alloc_name(), the other callers can save a parameter.
prev parent reply other threads:[~2024-06-19 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 13:17 [PATCH net-next] net: core: Remove the dup_errno parameter in dev_prep_valid_name() Yajun Deng
2024-06-18 14:05 ` Jiri Pirko
2024-06-18 14:48 ` Jakub Kicinski
2024-06-19 1:55 ` Yajun Deng [this message]
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=077a532cb112d296b6cfb7692ed25bf9dd64f199@linux.dev \
--to=yajun.deng@linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).