From: Steven Price <steven.price@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Price <steven.price@arm.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Jason Gunthorpe <jgg@ziepe.ca>,
Thomas Hellstrom <thellstrom@vmware.com>,
Christoph Hellwig <hch@lst.de>, kernel test robot <lkp@intel.com>
Subject: [PATCH] smaps: Fix defined but not used smaps_shmem_walk_ops
Date: Mon, 3 Apr 2023 12:12:55 +0100 [thread overview]
Message-ID: <20230403111255.141623-1-steven.price@arm.com> (raw)
When !CONFIG_SHMEM smaps_shmem_walk_ops is defined but not used,
triggering a compiler warning. Surround the definition with an #ifdef to
keep the compiler happy.
Fixes: 7b86ac3371b7 ("pagewalk: separate function pointers from iterator data")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304031749.UiyJpxzF-lkp@intel.com/
Signed-off-by: Steven Price <steven.price@arm.com>
---
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 6a96e1713fd5..3d4f8859dac1 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -761,11 +761,13 @@ static const struct mm_walk_ops smaps_walk_ops = {
.hugetlb_entry = smaps_hugetlb_range,
};
+#ifdef CONFIG_SHMEM
static const struct mm_walk_ops smaps_shmem_walk_ops = {
.pmd_entry = smaps_pte_range,
.hugetlb_entry = smaps_hugetlb_range,
.pte_hole = smaps_pte_hole,
};
+#endif
/*
* Gather mem stats from @vma with the indicated beginning
--
2.34.1
next reply other threads:[~2023-04-03 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 11:12 Steven Price [this message]
2023-04-03 14:52 ` [PATCH] smaps: Fix defined but not used smaps_shmem_walk_ops Jason Gunthorpe
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=20230403111255.141623-1-steven.price@arm.com \
--to=steven.price@arm.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=jgg@ziepe.ca \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=thellstrom@vmware.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;
as well as URLs for NNTP newsgroup(s).