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: <fcc670ec-47fa-4ee3-ab10-b76236711091@huawei.com>
Date: Tue, 27 Aug 2024 14:15:38 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: Matthew Wilcox <willy@...radead.org>
CC: <kees@...nel.org>, <andy@...nel.org>, <akpm@...ux-foundation.org>,
	<trondmy@...nel.org>, <anna@...nel.org>, <gregkh@...uxfoundation.org>,
	<linux-hardening@...r.kernel.org>, <linux-mm@...ck.org>,
	<linux-nfs@...r.kernel.org>
Subject: Re: [PATCH -next v3 3/3] nfs make use of str_false_true helper



On 2024/8/27 11:33, Matthew Wilcox wrote:
> On Tue, Aug 27, 2024 at 10:45:17AM +0800, Hongbo Li wrote:
>> The helper str_false_true is introduced to reback "false/true"
>> string literal. We can simplify this format by str_false_true.
> 
> This seems unnecessarily verbose & complex.  How about:
> 
> 	dprintk("%s: link support=%s\n", __func__, strbool(*res != 0));

This just keeps consistency with other string literal helpers such as 
"str_up_down", "str_yes_no" defined in include/linux/string_choices.h.

> 
>> -	dprintk("%s: link support=%s\n", __func__, *res == 0 ? "false" : "true");
>> +	dprintk("%s: link support=%s\n", __func__, str_false_true(*res == 0));
> 
> (do we have a convention for the antonym of kstrtoX?)

No, I haven't found this kind of convention helpers.

Thanks,
Hongbo

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ