linux-yocto/drivers/net/ethernet/marvell
Al Viro f7862dfef6 saner replacement for debugfs_rename()
Existing primitive has several problems:
	1) calling conventions are clumsy - it returns a dentry reference
that is either identical to its second argument or is an ERR_PTR(-E...);
in both cases no refcount changes happen.  Inconvenient for users and
bug-prone; it would be better to have it return 0 on success and -E... on
failure.
	2) it allows cross-directory moves; however, no such caller have
ever materialized and considering the way debugfs is used, it's unlikely
to happen in the future.  What's more, any such caller would have fun
issues to deal with wrt interplay with recursive removal.  It also makes
the calling conventions clumsier...
	3) tautological rename fails; the callers have no race-free way
to deal with that.
	4) new name must have been formed by the caller; quite a few
callers have it done by sprintf/kasprintf/etc., ending up with considerable
boilerplate.

Proposed replacement: int debugfs_change_name(dentry, fmt, ...).  All callers
convert to that easily, and it's simpler internally.

IMO debugfs_rename() should go; if we ever get a real-world use case for
cross-directory moves in debugfs, we can always look into the right way
to handle that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20250112080705.141166-21-viro@zeniv.linux.org.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-15 13:14:37 +01:00
..
mvpp2 net: marvell: use ethtool string helpers 2024-10-29 16:21:37 -07:00
octeon_ep net: marvell: use ethtool string helpers 2024-10-29 16:21:37 -07:00
octeon_ep_vf net: marvell: use ethtool string helpers 2024-10-29 16:21:37 -07:00
octeontx2 octeontx2: don't mess with ->d_parent or ->d_parent->d_name 2025-01-15 13:14:37 +01:00
prestera netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
Kconfig
Makefile
mv643xx_eth.c net: mv643xx_eth: fix an OF node reference leak 2024-12-30 17:40:34 -08:00
mvmdio.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
mvneta_bm.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
mvneta_bm.h
mvneta.c net: mvneta: use ethtool_puts 2024-10-14 17:57:03 -07:00
pxa168_eth.c marvell: pxa168_eth: fix call balance of pep->clk handling routines 2024-11-26 11:49:51 +01:00
skge.c saner replacement for debugfs_rename() 2025-01-15 13:14:37 +01:00
skge.h
sky2.c saner replacement for debugfs_rename() 2025-01-15 13:14:37 +01:00
sky2.h