From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
"Huacai Chen" <chenhuacai@kernel.org>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning
Date: Fri, 13 Oct 2023 09:08:48 -0700 [thread overview]
Message-ID: <ZSlrkKHT_U64raV4@google.com> (raw)
In-Reply-To: <20231012152542.1355621-1-pbonzini@redhat.com>
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
prev parent reply other threads:[~2023-10-13 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 15:25 [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning Paolo Bonzini
2023-10-13 16:08 ` Sean Christopherson [this message]
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=ZSlrkKHT_U64raV4@google.com \
--to=seanjc@google.com \
--cc=chenhuacai@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=tsbogend@alpha.franken.de \
/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