From: Xiaoyao Li <xiaoyao.li@intel.com>
To: sunliming <sunliming@kylinos.cn>,
isaku.yamahata@intel.com, pbonzini@redhat.com, seanjc@google.com,
mingo@kernel.org
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
kelulanainsley@gmail.com, x86@kernel.org,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type()
Date: Mon, 13 Jun 2022 10:47:53 +0800 [thread overview]
Message-ID: <66c1cf3a-9f2a-e05a-3c76-62b1ee056385@intel.com> (raw)
In-Reply-To: <20220612035641.1161945-1-sunliming@kylinos.cn>
On 6/12/2022 11:56 AM, sunliming wrote:
> 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]
Please note, the code doesn't get into upstream yet.
The fix shouldn't be sent to upstream maillist.
> 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
next prev parent reply other threads:[~2022-06-13 2:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 3:56 sunliming
2022-06-13 2:47 ` Xiaoyao Li [this message]
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=66c1cf3a-9f2a-e05a-3c76-62b1ee056385@intel.com \
--to=xiaoyao.li@intel.com \
--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=sunliming@kylinos.cn \
--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
all inboxes | Powered by JetHome®