Re: [PATCH net-next] net: core: Remove the dup_errno parameter in dev_prep_valid_name()

From: Jiri Pirko
Date: Tue Jun 18 2024 - 10:31:01 EST


Tue, Jun 18, 2024 at 03:17:43PM CEST, yajun.deng@xxxxxxxxx wrote:
>netdev_name_in_use() return -EEXIST makes more sense if it's not NULL.
>But dev_alloc_name() should keep the -ENFILE errno.
>
>Remove the dup_errno parameter in dev_prep_valid_name() and add a
>conditional operator to dev_alloc_name(), replace -EEXIST with
>-ENFILE.
>
>Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>

Why not.

Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>