diff options
| author | SeongJae Park <[email protected]> | 2022-05-09 18:20:55 -0700 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2022-05-13 07:20:08 -0700 |
| commit | 3cbab4ca1ea8752912d8719d72059869b4c18045 (patch) | |
| tree | 810bed6b77a475f67f665b7549adab80ba8dee25 /tools/perf/scripts/python | |
| parent | 97d482f4592fde2322c319f07bc54f3a0d37861c (diff) | |
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/[email protected]
Signed-off-by: SeongJae Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions