diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-01-16 21:42:16 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-25 20:22:46 -0800 |
commit | 56dff92932591638b249911fd4529a1e47480a04 (patch) | |
tree | 8990df260488bad280128ae91368e255a45d2d24 | |
parent | 3c7fd94205f86ad89f1d1d01dbfbc4b139860d8f (diff) | |
download | lwn-56dff92932591638b249911fd4529a1e47480a04.tar.gz lwn-56dff92932591638b249911fd4529a1e47480a04.zip |
mm/damon/core: use str_high_low() helper in damos_wmark_wait_us()
Remove hard-coded strings by using the str_high_low() helper function.
Link: https://lkml.kernel.org/r/20250116204216.106999-2-thorsten.blum@linux.dev
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/damon/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c index 55a435bdd89d..c7b981308862 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> @@ -2075,9 +2076,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; } |