[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240627150355.023acba3@kernel.org>
Date: Thu, 27 Jun 2024 15:03:55 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Jiri Pirko
<jiri@...dia.com>
Subject: Re: [PATCH net-next v2] net: core: Remove the dup_errno parameter
in dev_prep_valid_name()
On Thu, 27 Jun 2024 21:41:31 +0800 Yajun Deng wrote:
> netdev_name_in_use() in dev_prep_valid_name() return -EEXIST makes
> more sense if it's not NULL, but dev_alloc_name() should keep the
> -ENFILE errno.
>
> There are three callers to dev_prep_valid_name(), the dup_errno
> parameter is only for dev_alloc_name, it's not necessary for the other
> callers.
>
> Remove the dup_errno parameter in dev_prep_valid_name() and add a
> conditional operator to dev_alloc_name(), replace -EEXIST with
> -ENFILE.
Let me be more direct this time - I like this code the way I wrote it.
Please leave it be.
--
pw-bot: reject
Powered by blists - more mailing lists