summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2022-05-10 04:20:55 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-05-13 17:20:08 +0300
commit3cbab4ca1ea8752912d8719d72059869b4c18045 (patch)
tree810bed6b77a475f67f665b7549adab80ba8dee25 /include
parent97d482f4592fde2322c319f07bc54f3a0d37861c (diff)
downloadlinux-3cbab4ca1ea8752912d8719d72059869b4c18045.tar.xz
mm/damon/sysfs: use enum for 'state' input handling
DAMON sysfs 'state' file handling code is using string literals in both 'state_show()' and 'state_store()'. This makes the code error prone and inflexible for future extensions. To improve the situation, this commit defines possible input strings and 'enum' for identifying each input keyword only once, and refactors the code to reuse those. Link: https://lkml.kernel.org/r/20220429160606.127307-10-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions