]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/damon/core: use str_high_low() helper in damos_wmark_wait_us()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 16 Jan 2025 20:42:16 +0000 (21:42 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:46 +0000 (20:22 -0800)
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>
mm/damon/core.c

index 55a435bdd89d95322d5a89a55282366d1d433cab..c7b9813088626530fc37a4d2494d24bfc261fca9 100644 (file)
@@ -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;
        }