[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2505189d-c682-ed70-442b-798c258d3b68@linaro.org>
Date: Tue, 13 Dec 2022 10:47:23 +0100
From: Philippe Mathieu-Daudé <philmd@...aro.org>
To: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Marc Zyngier <maz@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>
Cc: James Morse <james.morse@....com>,
Alexandru Elisei <alexandru.elisei@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Oliver Upton <oliver.upton@...ux.dev>,
Tom Rix <trix@...hat.com>, kvm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
kvmarm@...ts.cs.columbia.edu, linux-riscv@...ts.infradead.org,
llvm@...ts.linux.dev, linux-kernel@...r.kernel.org,
Ricardo Koller <ricarkol@...gle.com>,
Aaron Lewis <aaronlewis@...gle.com>,
Raghavendra Rao Ananta <rananta@...gle.com>
Subject: Re: [PATCH 05/14] KVM: selftests: Fix a typo in x86-64's
kvm_get_cpu_address_width()
On 13/12/22 01:16, Sean Christopherson wrote:
> Fix a == vs. = typo in kvm_get_cpu_address_width() that results in
> @pa_bits being left unset if the CPU doesn't support enumerating its
> MAX_PHY_ADDR. Flagged by clang's unusued-value warning.
>
> lib/x86_64/processor.c:1034:51: warning: expression result unused [-Wunused-value]
> *pa_bits == kvm_cpu_has(X86_FEATURE_PAE) ? 36 : 32;
>
> Fixes: 3bd396353d18 ("KVM: selftests: Add X86_FEATURE_PAE and use it calc "fallback" MAXPHYADDR")
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
> tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kvm/lib/x86_64/processor.c b/tools/testing/selftests/kvm/lib/x86_64/processor.c
> index c4d368d56cfe..acfa1d01e7df 100644
> --- a/tools/testing/selftests/kvm/lib/x86_64/processor.c
> +++ b/tools/testing/selftests/kvm/lib/x86_64/processor.c
> @@ -1031,7 +1031,7 @@ bool is_amd_cpu(void)
> void kvm_get_cpu_address_width(unsigned int *pa_bits, unsigned int *va_bits)
> {
> if (!kvm_cpu_has_p(X86_PROPERTY_MAX_PHY_ADDR)) {
> - *pa_bits == kvm_cpu_has(X86_FEATURE_PAE) ? 36 : 32;
> + *pa_bits = kvm_cpu_has(X86_FEATURE_PAE) ? 36 : 32;
:)
Reviewed-by: Philippe Mathieu-Daudé <philmd@...aro.org>
Powered by blists - more mailing lists