[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/11] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write
From: |
David Gibson |
Subject: |
Re: [PATCH 07/11] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write |
Date: |
Tue, 13 Jul 2021 10:06:53 +1000 |
On Mon, Jul 12, 2021 at 02:55:31PM -0700, Richard Henderson wrote:
> >From clang-13:
> hw/pci-host/pnv_phb4.c:375:18: error: variable 'v' set but not used \
> [-Werror,-Wunused-but-set-variable]
>
> It's pretty clear that we meant to write back 'v' after
> all that computation and not 'val'.
>
> Cc: qemu-ppc@nongnu.org
> Cc: Greg Kurz <groug@kaod.org>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/pci-host/pnv_phb4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
> index 54f57c660a..5c375a9f28 100644
> --- a/hw/pci-host/pnv_phb4.c
> +++ b/hw/pci-host/pnv_phb4.c
> @@ -392,7 +392,7 @@ static void pnv_phb4_ioda_write(PnvPHB4 *phb, uint64_t
> val)
> v &= 0xffffffffffff0000ull;
> v |= 0x000000000000cfffull & val;
> }
> - *tptr = val;
> + *tptr = v;
> break;
> }
> case IODA3_TBL_MBT:
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [PATCH 01/11] nbd/server: Remove unused variable, (continued)
[PATCH 04/11] net/checksum: Remove unused variable in net_checksum_add_iov, Richard Henderson, 2021/07/12
[PATCH 03/11] util/selfmap: Discard mapping on error, Richard Henderson, 2021/07/12
[PATCH 02/11] accel/tcg: Remove unused variable in cpu_exec, Richard Henderson, 2021/07/12
[PATCH 07/11] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write, Richard Henderson, 2021/07/12
- Re: [PATCH 07/11] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write,
David Gibson <=
[PATCH 05/11] hw/audio/adlib: Remove unused variable in adlib_callback, Richard Henderson, 2021/07/12
[PATCH 06/11] hw/ppc/spapr_events: Remove unused variable from check_exception, Richard Henderson, 2021/07/12
[PATCH 08/11] linux-user/syscall: Remove unused variable from execve, Richard Henderson, 2021/07/12
[PATCH 11/11] tcg/ppc: Ensure _CALL_SYSV is set for 32-bit ELF, Richard Henderson, 2021/07/12
[PATCH 09/11] tests/unit: Remove unused variable from test_io, Richard Henderson, 2021/07/12
[PATCH 10/11] tcg/ppc: Replace TCG_TARGET_CALL_DARWIN with _CALL_DARWIN, Richard Henderson, 2021/07/12