From nobody Mon Dec 23 23:02:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1734903986; cv=none; d=zohomail.com; s=zohoarc; b=CkV3jnOiJzMx5vm64GGyHfmvT3juHgwHLg47dbsOEFPyo4rMM0JmvzkzgNE/PpZBoj9PFwChNSIHiUDOnmEQrLPzJbEYHLnwwyc4Gi10dkr6IvQIUGMOf3R/FkqESEmZTqCNRUa5AMyun3V+WUqAypAtrY3T8dz0h3/QJYS+l1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734903986; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6Jx370CFTAl7yh8PdG3ZOseQcMn3UXlcTs+5VqFVgwk=; b=Cpk1DZ0O7dySgr0DUm8TG9IRKDjrDaGQL59TNyt9Rr/AiuO4CNc+e6aooTgvulVemL6IYJ/s0jPGuM+yMx2+CJMRmxE4MGKRcNPaz640gJlG2/enJvv8DT6XuhYpVZdWHESIyS4PawmH59TPUApy1o5G3NzvejqCBk0ecXrXQz8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734903986400851.9001525827754; Sun, 22 Dec 2024 13:46:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPTlO-0001hE-My; Sun, 22 Dec 2024 16:45:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPTlI-0001fy-Ud for qemu-devel@nongnu.org; Sun, 22 Dec 2024 16:45:21 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPTlH-0001vT-3d for qemu-devel@nongnu.org; Sun, 22 Dec 2024 16:45:20 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2163b0c09afso31867075ad.0 for ; Sun, 22 Dec 2024 13:45:17 -0800 (PST) Received: from grind.dc1.ventanamicro.com ([187.101.65.72]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f7312sm60737175ad.225.2024.12.22.13.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 13:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1734903915; x=1735508715; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6Jx370CFTAl7yh8PdG3ZOseQcMn3UXlcTs+5VqFVgwk=; b=et0WTLoWD9UufgsKKbUhxIEYwwyy84tL+OWUUpB1VzBsVegAI/0knDv53dQ/mmUNqW UmMF6+VxYPPasa7KU2UIXbelhtnIWU78BT0AILdMMG6RVJ/QHp8xN7VsUQ63aDN2Z+Zu vF19w8skXuMhsDdFWA9Lb9Md66i9ap0BW2OX8W5z2aJTWF+zl0GyTinHquYuAXIsrWq3 9pRZm7GgLEA4OHGPa7Cc/VRpF6bugNj5HtUilrpaAwFizm0k3VQoQj8bTbB+XVawx9VH AWmNMIgZKiNoByMvSjNJBE+E0w49ISu3BRcpDf5nJ2jMLpXVU11Z3Gbt5LlXBSFDOnjI vMcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734903915; x=1735508715; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6Jx370CFTAl7yh8PdG3ZOseQcMn3UXlcTs+5VqFVgwk=; b=wqr1aP9v/Pjz0qmySTG2RyQXvMO+VmOy4aTqFF6Zoh0nS9ocKGwRY7kBj3EdJuwpSt zmcCKLp7nRHyaNKxt22vrMLs3nHJACOfKjk/q31jol0Mlucy8Z/7vB9PJf2Ra8m0Zn8g Kv2gUOjI9RpZF2wNGBpTFTkKgvsAZpPGcye+uDl8LxCRiJL9xx2EeFmGU0g8p34QYXSN HuXLGQqOPwCUPdQ/iFXfuqQ5yGJa21b5ELkGwhMsPU7t42wcveKh5OlI6TrLsTVBWtz1 7ZxvfO0bbyY+xfxEYZTvctoI/mQkWH28PuDbjH/1IouDITd56+rOu67i0wiax0IPjxFk ciyg== X-Gm-Message-State: AOJu0Yx0eigGdGcEiBVpeHWE2eKgi+msAIFd82xiFGb6+AYjINOPtYaj 8CYc8W8zmnbcpjbmvgBYXynUyRIgeMN44IcU1Piiian6F7x+nAekXSBfROM6kFMCCU1Tr+AVQm6 tTNqKww== X-Gm-Gg: ASbGncvWqV731/1i9P+c64nojyfOrbzZ6ThkjU77gFEoE/zGh58U7xg0ru/n7aPgbD+ dlYnv8Ubt+jiYvRKIXl8Z5XNzNpGammD0mbPIuQK8tlPF2CYSZzUTMvggCklDrQ6PQeLFo4BynM JvraPS/kaw3c8Ux5ycwECEWBscgCh6nPqMDJv3XlUGE9cc0NwrFlZhkleHMF2Wze8tW3BBPqf2l iVToWx7SnR31pOw+LB9XWpc1YSloGjd+wtl/3n545avthItuqzgnlGrDNq16eq6BDO6LDqxp+HP GGlG7ks= X-Google-Smtp-Source: AGHT+IFKH9jwIo9aJMZrUJYkYeESxx2qnXCyqi01O2xyG92HUKJAvukWHW3gK6CRyMjpfQ7hL4ZwJg== X-Received: by 2002:a17:902:d2c3:b0:216:69ca:7714 with SMTP id d9443c01a7336-219e6e85c30mr145820255ad.11.1734903915653; Sun, 22 Dec 2024 13:45:15 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, Daniel Henrique Barboza , qemu-trivial@nongnu.org, Peter Maydell Subject: [PATCH] hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size' Date: Sun, 22 Dec 2024 18:45:07 -0300 Message-ID: <20241222214507.2173648-1-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=dbarboza@ventanamicro.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1734903988297116600 Content-Type: text/plain; charset="utf-8" Trivial fix for the following ticket: CID 1568580: Incorrect expression (EVALUATION_ORDER) In "table_size =3D table_size =3D n_vectors * 16U", "table_size" is written twice with the same value. Cc: qemu-trivial@nongnu.org Cc: Peter Maydell Resolves: Coverity CID 1568580 Fixes: 01c1caa9d1 ("hw/riscv/virt.c, riscv-iommu-sys.c: add MSIx support") Signed-off-by: Daniel Henrique Barboza --- 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(RISCVIOMMUState= Sys *s, uint32_t n_vectors) { RISCVIOMMUState *iommu =3D &s->iommu; - uint32_t table_size =3D table_size =3D n_vectors * PCI_MSIX_ENTRY_SIZE; + uint32_t table_size =3D n_vectors * PCI_MSIX_ENTRY_SIZE; uint32_t table_offset =3D RISCV_IOMMU_REG_MSI_CONFIG; uint32_t pba_size =3D QEMU_ALIGN_UP(n_vectors, 64) / 8; uint32_t pba_offset =3D RISCV_IOMMU_REG_MSI_CONFIG + 256; --=20 2.47.1