mm/damon: Fix missing-prototype build warning for 'damon_pa_apply_scheme()'
Subsystems (2)
SeongJae Park
maintainerPATCH 1/1 mm/damon: Fix missing-prototype build warning for 'damon_pa_apply_scheme()'
Kernel test robot found[1] commit ccd554f15bb1 ("mm/damon/paddr: support the pageout scheme") on the -mm tree[2], which is introduced by the patch titled 'mm-damon-paddr-support-the-pageout-scheme.patch'[3] introduces following build warning, and therefore the build fails if 'CONFIG_WERROR=y'.
linux/mm/damon/paddr.c:216:5: error: no previous prototype for ‘damon_pa_apply_scheme’ [-Werror=missing-prototypes]
int damon_pa_apply_scheme(struct damon_ctx *ctx, struct damon_target *t,
^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
linux/scripts/Makefile.build:277: recipe for target 'mm/damon/paddr.o' failed
This commit fixes the warning by adding the missed prototype in the header file.
Note: Because the reported '.config' introduces warnings on not only DAMON but also other subsystems, I tested for only DAMON by adding the below compiler flag in mm/damon/Makefile.
ccflags-$(CONFIG_DAMON_PADDR) += -Werror -Wmissing-prototypes
[1] https://lore.kernel.org/lkml/202110250029.5rftt73s-lkp(a)intel.com/
[2] https://github.com/hnaz/linux-mm/commit/ccd554f15bb1cd977d740c1ea8241ecf95108c94
[3] https://lore.kernel.org/mm-commits/20211019213137.91_rr1GrX%25akpm(a)linux-foundation.org/
--- include/linux/damon.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/damon.h +2 -0
@@ -357,6 +357,8 @@ void damon_va_set_primitives(struct damon_ctx *ctx);void damon_pa_prepare_access_checks (struct damon_ctx *ctx);unsigned int damon_pa_check_accesses (struct damon_ctx *ctx);bool damon_pa_target_valid (void *t); +int damon_pa_apply_scheme (struct damon_ctx *context,struct damon_target *t, +struct damon_region *r,struct damos *scheme);void damon_pa_set_primitives (struct damon_ctx *ctx);#endif /* CONFIG_DAMON_PADDR */
Signature · 1 line
2.17.1