Skip to content

Commit 56dff92

Browse files
tobluxakpm00
authored andcommitted
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/[email protected] Signed-off-by: Thorsten Blum <[email protected]> Reviewed-by: SeongJae Park <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 3c7fd94 commit 56dff92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm/damon/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/psi.h>
1515
#include <linux/slab.h>
1616
#include <linux/string.h>
17+
#include <linux/string_choices.h>
1718

1819
#define CREATE_TRACE_POINTS
1920
#include <trace/events/damon.h>
@@ -2075,9 +2076,8 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme)
20752076
if (metric > scheme->wmarks.high || scheme->wmarks.low > metric) {
20762077
if (scheme->wmarks.activated)
20772078
pr_debug("deactivate a scheme (%d) for %s wmark\n",
2078-
scheme->action,
2079-
metric > scheme->wmarks.high ?
2080-
"high" : "low");
2079+
scheme->action,
2080+
str_high_low(metric > scheme->wmarks.high));
20812081
scheme->wmarks.activated = false;
20822082
return scheme->wmarks.interval;
20832083
}

0 commit comments

Comments
 (0)