Skip to content

Commit

Permalink
mm/damon/dbgfs: remove an unnecessary error message
Browse files Browse the repository at this point in the history
When wrong scheme action is requested via the debugfs interface, DAMON
prints an error message.  Because the function returns error code, this
is not really needed.  Because the code path is triggered by the user
specified input, this can result in kernel log mistakenly being messy.
To avoid the case, this commit removes the message.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: af122dd ("mm/damon/dbgfs: support DAMON-based Operation Schemes")
Signed-off-by: SeongJae Park <[email protected]>
Cc: Brendan Higgins <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
sjp38 authored and torvalds committed Dec 11, 2021
1 parent 4de46a3 commit 0bceffa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/damon/dbgfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,8 @@ static struct damos **str_to_schemes(const char *str, ssize_t len,
&wmarks.low, &parsed);
if (ret != 18)
break;
if (!damos_action_valid(action)) {
pr_err("wrong action %d\n", action);
if (!damos_action_valid(action))
goto fail;
}

pos += parsed;
scheme = damon_new_scheme(min_sz, max_sz, min_nr_a, max_nr_a,
Expand Down

0 comments on commit 0bceffa

Please sign in to comment.