Thread (18 messages) 18 messages, 18 authors, 2024-06-10

Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

From: Jani Nikula <jani.nikula@linux.intel.com>
Date: 2024-06-04 07:46:33
Also in: alsa-devel, cgroups, dri-devel, intel-gfx, intel-xe, keyrings, linux-acpi, linux-bcachefs, linux-clk, linux-crypto, linux-fbdev, linux-gpio, linux-hardening, linux-hwmon, linux-i2c, linux-ide, linux-integrity, linux-leds, linux-mediatek, linux-mm, linux-mmc, linux-omap, linux-pci, linux-phy, linux-pm, linux-rockchip, linux-security-module, linux-sound, linux-staging, linux-sunxi, linux-tegra, linux-usb, linux-wireless, linuxppc-dev, lkml, netdev, nouveau, platform-driver-x86

On Sun, 02 Jun 2024, Andy Shevchenko [off-list ref] wrote:
Make two APIs look similar. Hence convert match_string() to be
a 2-argument macro. In order to avoid unneeded churn, convert
all users as well. There is no functional change intended.
Why do we think it's a good idea to increase and normalize the use of
double-underscore function names across the kernel, like
__match_string() in this case? It should mean "reserved for the
implementation, not to be called directly".

If it's to be used directly, it should be named accordingly, right?

Being in line with __sysfs_match_string() isn't a great argument alone,
because this adds three times the number of __match_string() calls than
there are __sysfs_match_string() calls. It's not a good model to follow.
Arguably both should be renamed.

BR,
Jani.


-- 
Jani Nikula, Intel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help