All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: kbuild-all@lists.01.org
Subject: [PATCH] mm/damon: Fix missing-prototype build warning for 'damon_pa_apply_scheme()'
Date: Mon, 25 Oct 2021 06:42:20 +0000	[thread overview]
Message-ID: <20211025064220.13904-1-sj@kernel.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2147 bytes --]

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/

Fixes: ccd554f15bb1 ("mm/damon/paddr: support the pageout scheme") in -mm tree
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 include/linux/damon.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 715dadd21f7c..9a327bc787b5 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -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 */
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: SeongJae Park <sj@kernel.org>
To: akpm@linux-foundation.org
Cc: lkp@intel.com, hannes@cmpxchg.org, kbuild-all@lists.01.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	SeongJae Park <sj@kernel.org>
Subject: [PATCH] mm/damon: Fix missing-prototype build warning for 'damon_pa_apply_scheme()'
Date: Mon, 25 Oct 2021 06:42:20 +0000	[thread overview]
Message-ID: <20211025064220.13904-1-sj@kernel.org> (raw)

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@intel.com/
[2] https://github.com/hnaz/linux-mm/commit/ccd554f15bb1cd977d740c1ea8241ecf95108c94
[3] https://lore.kernel.org/mm-commits/20211019213137.91_rr1GrX%25akpm@linux-foundation.org/

Fixes: ccd554f15bb1 ("mm/damon/paddr: support the pageout scheme") in -mm tree
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 include/linux/damon.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 715dadd21f7c..9a327bc787b5 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -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 */
-- 
2.17.1



             reply	other threads:[~2021-10-25  6:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  6:42 SeongJae Park [this message]
2021-10-25  6:42 ` [PATCH] mm/damon: Fix missing-prototype build warning for 'damon_pa_apply_scheme()' SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211025064220.13904-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.