From: sunliming <sunliming@kylinos.cn>
To: isaku.yamahata@intel.com, pbonzini@redhat.com, seanjc@google.com,
mingo@kernel.org
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
sunliming@kylinos.cn, kelulanainsley@gmail.com, x86@kernel.org,
kernel test robot <lkp@intel.com>
Subject: [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type()
Date: Sun, 12 Jun 2022 11:56:41 +0800 [thread overview]
Message-ID: <20220612035641.1161945-1-sunliming@kylinos.cn> (raw)
The variable 'type' in split_page_type() is set but not used, so remove
it.
Fixes the following w1 warning:
arch/x86/kvm/mmu/mmu.c:982:28: warning: variable 'type' set but not used [-Wunused-but-set-variable]
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: sunliming <sunliming@kylinos.cn>
---
arch/x86/kvm/mmu/mmu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 7b3df91a93cf..f4d577335f94 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -979,14 +979,12 @@ static void split_page_type(gfn_t gfn, struct kvm_memory_slot *slot,
enum pg_level level)
{
struct kvm_page_attr *page_attr = page_attr_slot(gfn, slot, level);
- enum kvm_page_type type;
gfn_t base_gfn;
if (WARN_ON_ONCE(!kvm_page_type_valid(page_attr) || level <= PG_LEVEL_4K))
return;
base_gfn = gfn & ~(KVM_PAGES_PER_HPAGE(level) - 1);
- type = page_attr->type;
/*
* Set the type to KVM_PAGE_TYPE_MIXED in advance since when a large
--
2.25.1
next reply other threads:[~2022-06-12 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 3:56 sunliming [this message]
2022-06-13 2:47 ` [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type() Xiaoyao Li
2022-06-14 0:52 ` sunliming
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=20220612035641.1161945-1-sunliming@kylinos.cn \
--to=sunliming@kylinos.cn \
--cc=isaku.yamahata@intel.com \
--cc=kelulanainsley@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=x86@kernel.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 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).