* [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type()
@ 2022-06-12 3:56 sunliming
2022-06-13 2:47 ` Xiaoyao Li
0 siblings, 1 reply; 3+ messages in thread
From: sunliming @ 2022-06-12 3:56 UTC (permalink / raw)
To: isaku.yamahata, pbonzini, seanjc, mingo
Cc: kvm, linux-kernel, sunliming, kelulanainsley, x86, kernel test robot
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type()
2022-06-12 3:56 [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type() sunliming
@ 2022-06-13 2:47 ` Xiaoyao Li
2022-06-14 0:52 ` sunliming
0 siblings, 1 reply; 3+ messages in thread
From: Xiaoyao Li @ 2022-06-13 2:47 UTC (permalink / raw)
To: sunliming, isaku.yamahata, pbonzini, seanjc, mingo
Cc: kvm, linux-kernel, kelulanainsley, x86, kernel test robot
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type()
2022-06-13 2:47 ` Xiaoyao Li
@ 2022-06-14 0:52 ` sunliming
0 siblings, 0 replies; 3+ messages in thread
From: sunliming @ 2022-06-14 0:52 UTC (permalink / raw)
To: Xiaoyao Li
Cc: isaku.yamahata, pbonzini, seanjc, mingo, kvm, linux-kernel, x86,
kernel test robot
I got it, I am sorry aboot it , thanks.
Xiaoyao Li <xiaoyao.li@intel.com> 于2022年6月13日周一 10:48写道:
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-14 0:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-12 3:56 [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type() sunliming
2022-06-13 2:47 ` Xiaoyao Li
2022-06-14 0:52 ` sunliming
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).