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

Jani Nikula jani.nikula at linux.intel.com
Tue Jun 4 07:45:37 UTC 2024


On Sun, 02 Jun 2024, Andy Shevchenko <andriy.shevchenko at linux.intel.com> 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


More information about the Intel-xe mailing list