[PATCH 3/6] samples/damon/mtier: rename to have damon_sample_ prefix

SeongJae Park posted 6 patches 3 months ago
[PATCH 3/6] samples/damon/mtier: rename to have damon_sample_ prefix
Posted by SeongJae Park 3 months ago
DAMON sample module, mtier has its name 'mtier'.  It could conflict with
future modules, and not very easy to identify it by name.  Use a prefix,
"damon_sample_" for the name.

Note that this could break users if they depend on the old name.  But it
is just a sample, so no such usage is expected, or known.  Even if such
usage exists, updating it for the new name should be straightforward.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 samples/damon/mtier.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index 97892ade7f31..af168e887f73 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -12,6 +12,11 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
+#ifdef MODULE_PARAM_PREFIX
+#undef MODULE_PARAM_PREFIX
+#endif
+#define MODULE_PARAM_PREFIX "damon_sample_mtier."
+
 static unsigned long node0_start_addr __read_mostly;
 module_param(node0_start_addr, ulong, 0600);
 
-- 
2.39.5