From patchwork Tue Nov 26 11:22:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 845561 Delivered-To: patch@linaro.org Received: by 2002:a5d:6989:0:b0:382:43a8:7b94 with SMTP id g9csp154979wru; Tue, 26 Nov 2024 03:24:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUN0+RBp7XJ/H7QDhT0TQB94gXhY76NLpPSo4j4M3WYhBv3jI8z51QKWyrnlcl+cd3eBc9bSg==@linaro.org X-Google-Smtp-Source: AGHT+IFSQDM0S9IqHIyGyQjh3/RrgdROQ+BNmw1Icm/WwSHrm5riWUhWHNi/pWoS2EXfZsjyLXlu X-Received: by 2002:a05:620a:248f:b0:7ac:e8bf:894a with SMTP id af79cd13be357-7b674586e80mr359604685a.20.1732620256989; Tue, 26 Nov 2024 03:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732620256; cv=none; d=google.com; s=arc-20240605; b=VXyCM7V2Cyo1NBBAvJDxh/01mkKbzMYW5KmT7mWmcEJIrCVRvz1i41e9+q6ur6+5vW PQGqDN1ELyQ6KDj227r8NZeVEzSLCgiVoUE7cX4uZUjCSaro+vrK4NMifgMLvXF1rmnf TzzUDnT+RUb5QFd2eYs02QK1YUV1Pw8v0jpJ7qHAJ3cNz44mG6D/O7EWx3gosQLiR7JE ict7NVcQzTKyPm91iXEn64cj9HszdMB9iOGjSK6+ZRMfYL2GJldYmridGUbi2CjoB5Ui IDs64F4n1OHNsmehg7y2cB8y/1lj08EqS8lZaob1eraaI6qqwEiEZjwEJxzjk75dIFVB sgVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+qPY7Uz0dqRmk2gQ1cO3DBCcFXLLvxMC18yQC1ilSgA=; fh=siS/4HMv/4Bjpv+J3MqwgZ5TPB6jtxhL8giIGJt6+cQ=; b=gUs7yCmg111UTn2aX5NxwqIU78vCenoNyqpUqToyz/rtgnz/CR5yGqmbcTp2ADtWH4 yIHNQRqnIs2RoLjTvoG8pSaWkS81nfaLzCVHn12ytTgilowuAJ0qxl+QUeOlx8BirMl+ 4uIOfEfwjd6MOwOVRH6chgzpoK1vltYVNPt69yk9oNju46AZusUA74Lk/xoBiarAx0E0 FPD8i4UOiZ22qC1CLE4+0p0KKW2ITjSpQ4fsO3WANSMA6BZsM0y2L/WWqLaAw/JgSW3A 4pUM71+O51v70ue8d1tZva4plt734WHuu7VnR6Ri13xi22e3fT5tPGbyew/sVLlPL9gE kNqQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G31NQHlv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46680de4ccfsi72255581cf.23.2024.11.26.03.24.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Nov 2024 03:24:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G31NQHlv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFteF-0003iE-09; Tue, 26 Nov 2024 06:22:27 -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 1tFteD-0003hN-FQ for qemu-devel@nongnu.org; Tue, 26 Nov 2024 06:22:25 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFteB-0002Xa-4I for qemu-devel@nongnu.org; Tue, 26 Nov 2024 06:22:25 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-434a766b475so3618105e9.1 for ; Tue, 26 Nov 2024 03:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732620141; x=1733224941; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+qPY7Uz0dqRmk2gQ1cO3DBCcFXLLvxMC18yQC1ilSgA=; b=G31NQHlvGZkGawebft97sYhAhilqUvGvkbd1zMeMwhwlN14M5eRWiTdyyCvvbnxC4R RP34PkS1VK4rlcCJ/lPYuUJR1oGU2dbuBxD8DbTBC/kIlCS8YWBugmj496sPikjghPQZ w8jdIfgZIUwIT9xpBaE+LWrmstHQDEk573vvWcVNlOqpgEd+oKx31Ge3/EUqrg1BZ4R1 oQmGr1FdTou24m7GXGJtJ2gnhCVZIOQ8MyvVsLEZW6eSXAsfHn5FY6LXLW0iTGF3hnoU WKGAmMMyFBQ61vrXbrC+fAX43htEOU62rrRhwji0xmbnQ83nZb9KIhRF+XXZhBwMMnqp KJSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732620141; x=1733224941; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+qPY7Uz0dqRmk2gQ1cO3DBCcFXLLvxMC18yQC1ilSgA=; b=iszGEgqbX2TzRmlr7cPUQLRrupx5UWgqj/tlUtb+SPzhImqpV9sVs8ENb5HOYfU4uv mbW+xEb/RQl67dPsLjRIRXPf5YUS3oLm8EEip3EbCnmv07AO0mpYK3E55sUfGsnPZkpp MnvgX4S0weMp3vHkbee/8HGTeAu7dMR2oj8B15qpsqYcG86K205BJsCwsFg6dSh3KOyC D8YU0S0H5bsYogHTMkcNZo0VzDbvrCGcADIWi6Aok9PvfzQF1d6VFdKnHgwAHP5zOUJh SZfm9990l1Fcfcx0+ZPdHn8TYUwKY7v3ozSHtbyJncAcBcxY2lIaB6OlpXA6Fo107W9K OiUA== X-Gm-Message-State: AOJu0YwnEDTWFAS8lH9EWv52mLvuaFGNpAj7QnkUXcZAjctjHD5yr/cR pFHnH0F4jE90xid6Ek4r8+ro2qsHA6n4ZsDlYt1/l7COsU5/WNPLDPHC3gIG7rABTEOXiHeIOmJ r X-Gm-Gg: ASbGnctCZvtAFudLkNbDFIWBme3ADC479JrVdLOxNygWLR3n4gsAXVL5r5O9iIN+H6o +dETAp5dQvZn/PSQs1qHOVkVJqHBoV8s7cVt6X0eogGvUiqulfyh/FL5I00P3xigy9yf0g09v+P pbMahqxOssyiafA0hCm2diay/2PQ31awWLahMFjZhgP3EZcU0eP+0k+YyqDlSyQNh5rWKrzoq47 TO9La7CNM+4hxGSfysVWQxUAoWz9St7YQWlapHuzRD/tSuvQHozBeYbTKTxuNVWIJhb6jan X-Received: by 2002:a05:600c:a12:b0:434:a19a:5965 with SMTP id 5b1f17b1804b1-434a19a5bf9mr43582535e9.6.1732620141039; Tue, 26 Nov 2024 03:22:21 -0800 (PST) Received: from localhost.localdomain ([176.176.143.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434a50613c5sm25019945e9.0.2024.11.26.03.22.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Nov 2024 03:22:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, Thomas Huth , "Michael S. Tsirkin" , qemu-riscv@nongnu.org, Marcel Apfelbaum , Peter Maydell , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.0 v2 01/13] hw/pci: Do not declare PCIBus::flags mask as enum Date: Tue, 26 Nov 2024 12:22:00 +0100 Message-ID: <20241126112212.64524-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241126112212.64524-1-philmd@linaro.org> References: <20241126112212.64524-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We use PCIBus::flags to mask various flags. It is not an enum, and doing so confuses static analyzers. Rename the enum as singular. Use a generic unsigned type for the mask. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci/pci_bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h index 22613125462..6ecfe2e06d5 100644 --- a/include/hw/pci/pci_bus.h +++ b/include/hw/pci/pci_bus.h @@ -19,7 +19,7 @@ struct PCIBusClass { uint16_t (*numa_node)(PCIBus *bus); }; -enum PCIBusFlags { +enum PCIBusFlag { /* This bus is the root of a PCI domain */ PCI_BUS_IS_ROOT = 0x0001, /* PCIe extended configuration space is accessible on this bus */ @@ -32,7 +32,7 @@ enum PCIBusFlags { struct PCIBus { BusState qbus; - enum PCIBusFlags flags; + unsigned flags; const PCIIOMMUOps *iommu_ops; void *iommu_opaque; uint8_t devfn_min;