Re: [PATCH] ufs: Use str_enable_disable-like helpers

From: Bart Van Assche
Date: Wed Jan 15 2025 - 12:54:04 EST


On 1/14/25 12:07 PM, Krzysztof Kozlowski wrote:
2. Is slightly shorter thus also easier to read.

Does this change really make code easier to read? It forces readers
of the code to look up a function definition. Isn't there a general
preference in the Linux kernel to inline function definitions if the
function body is shorter than or close to the length of the function
name? I'm referring to functions like this one:

static inline const char *str_up_down(bool v)
{
return v ? "up" : "down";
}

Bart.