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: <20250116211758.47368-1-sj@kernel.org>
Date: Thu, 16 Jan 2025 13:17:58 -0800
From: SeongJae Park <sj@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: SeongJae Park <sj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	damon@...ts.linux.dev,
	linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/damon/core: Use str_high_low() helper in damos_wmark_wait_us()

Hello Thorsten,

On Thu, 16 Jan 2025 21:42:16 +0100 Thorsten Blum <thorsten.blum@...ux.dev> wrote:

> Remove hard-coded strings by using the str_high_low() helper function.

Thank you for this patch!

> 
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>

Reviewed-by: SeongJae Park <sj@...nel.org>


Thanks,
SJ

> ---
>  mm/damon/core.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/damon/core.c b/mm/damon/core.c
> index 0776452a1abb..ae1715a338d4 100644
> --- a/mm/damon/core.c
> +++ b/mm/damon/core.c
> @@ -14,6 +14,7 @@
>  #include <linux/psi.h>
>  #include <linux/slab.h>
>  #include <linux/string.h>
> +#include <linux/string_choices.h>
>  
>  #define CREATE_TRACE_POINTS
>  #include <trace/events/damon.h>
> @@ -1894,9 +1895,8 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme)
>  	if (metric > scheme->wmarks.high || scheme->wmarks.low > metric) {
>  		if (scheme->wmarks.activated)
>  			pr_debug("deactivate a scheme (%d) for %s wmark\n",
> -					scheme->action,
> -					metric > scheme->wmarks.high ?
> -					"high" : "low");
> +				 scheme->action,
> +				 str_high_low(metric > scheme->wmarks.high));
>  		scheme->wmarks.activated = false;
>  		return scheme->wmarks.interval;
>  	}
> -- 
> 2.48.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ