[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/11] hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size'
From: |
Michael Tokarev |
Subject: |
[PULL 09/11] hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size' |
Date: |
Sat, 28 Dec 2024 14:54:44 +0300 |
From: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Trivial fix for the following ticket:
CID 1568580: Incorrect expression (EVALUATION_ORDER)
In "table_size = table_size = n_vectors * 16U",
"table_size" is written twice with the same value.
Cc: qemu-trivial@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Resolves: Coverity CID 1568580
Fixes: 01c1caa9d1 ("hw/riscv/virt.c, riscv-iommu-sys.c: add MSIx support")
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/riscv/riscv-iommu-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/riscv/riscv-iommu-sys.c b/hw/riscv/riscv-iommu-sys.c
index 28153f38da..65b24fb07d 100644
--- a/hw/riscv/riscv-iommu-sys.c
+++ b/hw/riscv/riscv-iommu-sys.c
@@ -121,7 +121,7 @@ static void riscv_iommu_sysdev_init_msi(RISCVIOMMUStateSys
*s,
uint32_t n_vectors)
{
RISCVIOMMUState *iommu = &s->iommu;
- uint32_t table_size = table_size = n_vectors * PCI_MSIX_ENTRY_SIZE;
+ uint32_t table_size = n_vectors * PCI_MSIX_ENTRY_SIZE;
uint32_t table_offset = RISCV_IOMMU_REG_MSI_CONFIG;
uint32_t pba_size = QEMU_ALIGN_UP(n_vectors, 64) / 8;
uint32_t pba_offset = RISCV_IOMMU_REG_MSI_CONFIG + 256;
--
2.39.5
- [PULL 00/11] Trivial patches for 2024-12-28, Michael Tokarev, 2024/12/28
- [PULL 01/11] docs/devel: remove dead video link for sourcehut submit process, Michael Tokarev, 2024/12/28
- [PULL 02/11] hw/timer/hpet: Fix comment about capabilities register, Michael Tokarev, 2024/12/28
- [PULL 05/11] docs: Correct '-runas' and '-fsdev/-virtfs proxy' indentation, Michael Tokarev, 2024/12/28
- [PULL 06/11] docs: Correct release of TCG trace-events removal, Michael Tokarev, 2024/12/28
- [PULL 09/11] hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size',
Michael Tokarev <=
- [PULL 11/11] qmp: update vhost-user protocol feature maps, Michael Tokarev, 2024/12/28
- [PULL 04/11] vvfat: fix ubsan issue in create_long_filename, Michael Tokarev, 2024/12/28
- [PULL 03/11] hw/timer/hpet: Drop the unused macro, Michael Tokarev, 2024/12/28
- [PULL 08/11] target/i386/cpu: Fix notes for CPU models, Michael Tokarev, 2024/12/28
- [PULL 07/11] docs: Replace 'since' -> 'removed in' in removed-features.rst, Michael Tokarev, 2024/12/28
- [PULL 10/11] contrib/plugins/bbv.c: Start bb index from 1, Michael Tokarev, 2024/12/28
- Re: [PULL 00/11] Trivial patches for 2024-12-28, Stefan Hajnoczi, 2024/12/28