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] [day] [month] [year] [list]
Message-ID: <9502638c-1058-4a82-934b-87d4995ec8b2@kernel.org>
Date: Wed, 5 Nov 2025 17:23:39 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Huisong Li <lihuisong@...wei.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] w1: therm: Use str_yes_no helper in w1_slave_show

On 05/11/2025 17:18, Thorsten Blum wrote:
> Replace hard-coded strings with the str_yes_no() helper function. This
> unifies the output and helps the linker with deduplication, which can
> result in a smaller binary.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
>  drivers/w1/slaves/w1_therm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
> index 9ccedb3264fb..0b54ab7f237e 100644
> --- a/drivers/w1/slaves/w1_therm.c
> +++ b/drivers/w1/slaves/w1_therm.c
> @@ -17,6 +17,7 @@
>  #include <linux/delay.h>
>  #include <linux/hwmon.h>
>  #include <linux/string.h>
> +#include <linux/string_choices.h>
>  #include <linux/jiffies.h>
>  
>  #include <linux/w1.h>
> @@ -1609,7 +1610,7 @@ static ssize_t w1_slave_show(struct device *device,
>  	for (i = 0; i < 9; ++i)
>  		c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ", info.rom[i]);
>  	c -= snprintf(buf + PAGE_SIZE - c, c, ": crc=%02x %s\n",
> -		      info.crc, (info.verdict) ? "YES" : "NO");

That's sysfs interface, right? So an ABI and you change here caps, which
might matter or might not, but anyway some sort of analysis of that
should be in the commit msg. Otherwise better not to touch ABI.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ