From: Qi Xi <xiqi2@huawei.com>
To: <bobo.shaobowang@huawei.com>, <xiqi2@huawei.com>,
<bhe@redhat.com>, <vgoyal@redhat.com>, <dyoung@redhat.com>,
<holzheu@linux.vnet.ibm.com>, <akpm@linux-foundation.org>,
<kexec@lists.infradead.org>, <linux-fsdevel@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] fs/proc: Fix compile warning about variable 'vmcore_mmap_ops'
Date: Thu, 31 Oct 2024 15:27:46 +0800 [thread overview]
Message-ID: <20241031072746.12897-1-xiqi2@huawei.com> (raw)
When build with !CONFIG_MMU, the variable 'vmcore_mmap_ops'
is defined but not used:
>> fs/proc/vmcore.c:458:42: warning: unused variable 'vmcore_mmap_ops'
458 | static const struct vm_operations_struct vmcore_mmap_ops = {
Fix this by declaring it __maybe_unused.
Fixes: 9cb218131de1 ("vmcore: introduce remap_oldmem_pfn_range()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/lkml/202410301936.GcE8yUos-lkp@intel.com/
Signed-off-by: Qi Xi <xiqi2@huawei.com>
---
fs/proc/vmcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 1fb213f379a5..9651f105c25b 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -455,7 +455,7 @@ static vm_fault_t mmap_vmcore_fault(struct vm_fault *vmf)
#endif
}
-static const struct vm_operations_struct vmcore_mmap_ops = {
+static const struct vm_operations_struct __maybe_unused vmcore_mmap_ops = {
.fault = mmap_vmcore_fault,
};
--
2.33.0
next reply other threads:[~2024-10-31 7:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 7:27 Qi Xi [this message]
2024-11-01 1:52 ` Andrew Morton
2024-11-01 3:23 ` [PATCH v2] " Qi Xi
2024-11-01 3:38 ` Jinjie Ruan
2024-11-01 3:43 ` [PATCH v3] " Qi Xi
2024-11-01 3:48 ` Qi Xi
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=20241031072746.12897-1-xiqi2@huawei.com \
--to=xiqi2@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bobo.shaobowang@huawei.com \
--cc=dyoung@redhat.com \
--cc=holzheu@linux.vnet.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.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
all inboxes | Powered by JetHome®