lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca5482da-1612-4fab-bfeb-bdc72cd65662@acm.org>
Date: Wed, 15 Jan 2025 09:53:33 -0800
From: Bart Van Assche <bvanassche@....org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 Peter Wang <peter.wang@...iatek.com>, Stanley Jhu <chu.stanley@...il.com>,
 Matthias Brugger <matthias.bgg@...il.com>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] ufs: Use str_enable_disable-like helpers

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ