* [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning
@ 2023-10-12 15:25 Paolo Bonzini
2023-10-13 16:08 ` Sean Christopherson
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-10-12 15:25 UTC (permalink / raw)
To: linux-kernel, kvm
The variable is completely unused, remove it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/mips/kvm/mmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
index 7b2ac1319d70..467ee6b95ae1 100644
--- a/arch/mips/kvm/mmu.c
+++ b/arch/mips/kvm/mmu.c
@@ -592,7 +592,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
gfn_t gfn = gpa >> PAGE_SHIFT;
int srcu_idx, err;
kvm_pfn_t pfn;
- pte_t *ptep, entry, old_pte;
+ pte_t *ptep, entry;
bool writeable;
unsigned long prot_bits;
unsigned long mmu_seq;
@@ -664,7 +664,6 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
entry = pfn_pte(pfn, __pgprot(prot_bits));
/* Write the PTE */
- old_pte = *ptep;
set_pte(ptep, entry);
err = 0;
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning
2023-10-12 15:25 [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning Paolo Bonzini
@ 2023-10-13 16:08 ` Sean Christopherson
0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2023-10-13 16:08 UTC (permalink / raw)
To: Paolo Bonzini
Cc: linux-kernel, kvm, Huacai Chen, Thomas Bogendoerfer,
Philippe Mathieu-Daudé
On Thu, Oct 12, 2023, Paolo Bonzini wrote:
> The variable is completely unused, remove it.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> arch/mips/kvm/mmu.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
> index 7b2ac1319d70..467ee6b95ae1 100644
> --- a/arch/mips/kvm/mmu.c
> +++ b/arch/mips/kvm/mmu.c
> @@ -592,7 +592,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
> gfn_t gfn = gpa >> PAGE_SHIFT;
> int srcu_idx, err;
> kvm_pfn_t pfn;
> - pte_t *ptep, entry, old_pte;
> + pte_t *ptep, entry;
> bool writeable;
> unsigned long prot_bits;
> unsigned long mmu_seq;
> @@ -664,7 +664,6 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
> entry = pfn_pte(pfn, __pgprot(prot_bits));
>
> /* Write the PTE */
> - old_pte = *ptep;
> set_pte(ptep, entry);
Heh, 7 year old bug gets two fixes within a few days :-)
https://lore.kernel.org/all/20231010085434.2678144-1-chenhuacai@loongson.cn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-13 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12 15:25 [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning Paolo Bonzini
2023-10-13 16:08 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox