Skip to content

Commit a874319

Browse files
danielhbMichael Tokarev
authored andcommitted
hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size'
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: [email protected] Cc: Peter Maydell <[email protected]> Resolves: Coverity CID 1568580 Fixes: 01c1caa ("hw/riscv/virt.c, riscv-iommu-sys.c: add MSIx support") Signed-off-by: Daniel Henrique Barboza <[email protected]> Reviewed-by: Michael Tokarev <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
1 parent 93dcc93 commit a874319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/riscv/riscv-iommu-sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static void riscv_iommu_sysdev_init_msi(RISCVIOMMUStateSys *s,
121121
uint32_t n_vectors)
122122
{
123123
RISCVIOMMUState *iommu = &s->iommu;
124-
uint32_t table_size = table_size = n_vectors * PCI_MSIX_ENTRY_SIZE;
124+
uint32_t table_size = n_vectors * PCI_MSIX_ENTRY_SIZE;
125125
uint32_t table_offset = RISCV_IOMMU_REG_MSI_CONFIG;
126126
uint32_t pba_size = QEMU_ALIGN_UP(n_vectors, 64) / 8;
127127
uint32_t pba_offset = RISCV_IOMMU_REG_MSI_CONFIG + 256;

0 commit comments

Comments
 (0)