From patchwork Mon Oct 25 06:42:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12580787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EA49C433FE for ; Mon, 25 Oct 2021 06:42:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 82AB560E08 for ; Mon, 25 Oct 2021 06:42:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 82AB560E08 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id CFB67940007; Mon, 25 Oct 2021 02:42:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C84646B0072; Mon, 25 Oct 2021 02:42:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4B26940007; Mon, 25 Oct 2021 02:42:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id A1EB36B006C for ; Mon, 25 Oct 2021 02:42:29 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 548F12DEAF for ; Mon, 25 Oct 2021 06:42:29 +0000 (UTC) X-FDA: 78734016018.31.6D97D10 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP id D719C10435AD for ; Mon, 25 Oct 2021 06:42:23 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 81A65603E9; Mon, 25 Oct 2021 06:42:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635144148; bh=OsynxOjzCTEacNWO7nrFI2IM+6xXMAuFFdcmvLCilkk=; h=From:To:Cc:Subject:Date:From; b=X3kb091lmY9mw6+CNpNKpKllG0NoQGhayCFo3g9iks5stJGwLqzwLtoxdX2uaUFJo XQ0yL+Ahsa7+yPvzgFBgqlYwRkYpoHz2OhMKtRfqQTnX4lYgenk09p2QpTDQURxR7S JXflPyXjPhAQ4W70eYt5oIzb1PxtorHBW9ruzux2BFsKgjdFcG4gUAHaGcaUxqCZ8K yBnu/4dsxLjqAdoxgwiNlBzAByfFvT9KGAyyoXVP/Q0n4xtcWuS/kyuI2YECN7QoU8 5xmSxdPpnHdX0GxpYuRBsZk205CiBeDFPGI1dipZGdcltBgb7dstVbxpFQ1wRyasPj VrRII9/mo0y0g== From: SeongJae Park 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 Subject: [PATCH] mm/damon: Fix missing-prototype build warning for 'damon_pa_apply_scheme()' Date: Mon, 25 Oct 2021 06:42:20 +0000 Message-Id: <20211025064220.13904-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Stat-Signature: xfe1odhmugccxdbq681cn7fx9bhjsngm Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=X3kb091l; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D719C10435AD X-HE-Tag: 1635144143-771456 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Signed-off-by: SeongJae Park --- 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 */