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>
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;