diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-10-24 13:03:00 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-24 13:03:01 -0700 |
commit | fcc017e3bc7ffff81d6d79678b3d5f6ce99b66ca (patch) | |
tree | ff9a6cbabbd721ea8fefb98d8ea6aab2a4f43cf2 /drivers/net/dsa/microchip/ksz_common.c | |
parent | fb1c535b13b7fa013e70265535182638ef2f04d6 (diff) | |
parent | ce4cfa2318afcd74cc41992e306a28fa04e5d484 (diff) |
Merge branch 'net-deduplicate-netdev-name-allocation'
Jakub Kicinski says:
====================
net: deduplicate netdev name allocation
After recent fixes we have even more duplicated code in netdev name
allocation helpers. There are two complications in this code.
First, __dev_alloc_name() clobbers its output arg even if allocation
fails, forcing callers to do extra copies. Second as our experience in
commit 55a5ec9b7710 ("Revert "net: core: dev_get_valid_name is now the same as dev_alloc_name_ns"") and
commit 029b6d140550 ("Revert "net: core: maybe return -EEXIST in __dev_alloc_name"")
taught us, user space is very sensitive to the exact error codes.
Align the callers of __dev_alloc_name(), and remove some of its
complexity.
v1: https://lore.kernel.org/all/20231020011856.3244410-1-kuba@kernel.org/
====================
Link: https://lore.kernel.org/r/20231023152346.3639749-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
0 files changed, 0 insertions, 0 deletions