From: Arnd Bergmann <arnd@kernel.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
"Muhammad Usama Anjum" <usama.anjum@collabora.com>,
"Andrei Vagin" <avagin@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
David Hildenbrand <david@redhat.com>,
"Mike Rapoport (IBM)" <rppt@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@Oracle.com>,
Hugh Dickins <hughd@google.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH] fs/proc/task_mmu: hide unused pagemap_scan_backout_range() function
Date: Wed, 27 Sep 2023 08:02:23 +0200 [thread overview]
Message-ID: <20230927060257.2975412-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
This function has two callers, each of which are hidden behind an #ifdef:
fs/proc/task_mmu.c:2022:13: error: 'pagemap_scan_backout_range' defined but not used [-Werror=unused-function]
Add another conditional to check for both options to avoid the
unused-function warning.
Fixes: 93538f467c0f6 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
A different fix "fs-proc-task_mmu-implement-ioctl-to-get-and-optionally-clear-info-about-ptes-fix-2"
was applied already but is wrong and introduces a worse result:
fs/proc/task_mmu.c:2105:17: error: implicit declaration of function 'pagemap_scan_backout_range'; did you mean 'pagemap_scan_push_range'? [-Werror=implicit-function-declaration]
Please use this one instead if no other fix has been merged in the meantime.
---
fs/proc/task_mmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 27da6337d6754..f5d3f2b8fa944 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -2019,6 +2019,7 @@ static bool pagemap_scan_push_range(unsigned long categories,
return true;
}
+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLB_PAGE)
static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
unsigned long addr, unsigned long end)
{
@@ -2031,6 +2032,7 @@ static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
p->found_pages -= (end - addr) / PAGE_SIZE;
}
+#endif
static int pagemap_scan_output(unsigned long categories,
struct pagemap_scan_private *p,
--
2.39.2
reply other threads:[~2023-09-27 6:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230927060257.2975412-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=Liam.Howlett@Oracle.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=avagin@gmail.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=rppt@kernel.org \
--cc=usama.anjum@collabora.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox