From nobody Tue Nov 18 10:37:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) client-ip=209.85.128.46; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f46.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1609707035; cv=none; d=zohomail.com; s=zohoarc; b=kpYMUma9RIrdbavJU4qWYkGjOLxdf0+AxILznqorKdHZpzsFw3eyZUOIKuUaJiVvCMyfJ4T31vQ3IVCrMJ8NYwCfO5x0UhtzJOx8hKHXZPLZwSLS0oQR6K2UQvbrgXmWyUJ5Rgro9GMJgxInM0hBAgglDQrOfTPh7Hfyl9OMmtM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609707035; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FI0wjjU7ydWM6Tw/dQ+710uQoMT5xzqHZJT1DeBID0A=; b=EgCGvnJZeIZsvOSKCs786yMv+0CEtFb0mcMcldOS0uqTzmFqiFAVfHZy1zsw6fqBLtj9JcLHUnqcI1GaXILLlI6MlgXAhSvG97Tg3KASt7zW/baeQVoGrZlbeJtGjwZP8XKu/1m8f7ED9G2ScIxfItlXZ/MXODevNOYHAAy/djY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.46 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.zohomail.com with SMTPS id 1609707035704268.4188701610934; Sun, 3 Jan 2021 12:50:35 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id q75so16659856wme.2 for ; Sun, 03 Jan 2021 12:50:35 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (194.red-83-57-172.dynamicip.rima-tde.net. [83.57.172.194]) by smtp.gmail.com with ESMTPSA id s12sm29011792wmh.29.2021.01.03.12.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 12:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FI0wjjU7ydWM6Tw/dQ+710uQoMT5xzqHZJT1DeBID0A=; b=olA1933n73p5oltNXmG5C0nNtJuhG2Xf72WqiwrGGYSpUjfmxqqjOXhsHh6NgPpSO1 Ao97KDc2pJrV0EEI+cJ0qsukDz+C2xPb9JN4Mnwu+Q3A6/rWujP0S3hgSgn0n0MRQzWJ qMde4brrz/WukXx8HO/IdfItke7PHh6bc7dl9exVj/0vGBOaQBEEgkgFGdgnBvX9yiBP R+UsbhstdpXOCV+b2PAPjYZw3Bi9DOybCmZighbvW2Nsvk/OXHsPs/h3Ig3lwWWT5+YW i0o2t8T4BZuJcr2uQbkmctOV7HjaxFIcfVVeDkb37TsllxvhdshsHlZ5SAtyUQGznUNg pYCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FI0wjjU7ydWM6Tw/dQ+710uQoMT5xzqHZJT1DeBID0A=; b=IubY2QFf/LhnAZeBdRrl47LS09uE7tv3rDAf2TGBVUBV08ba6hVVoi2m8UV+JOs9X4 Ii2U8K1CuAv1bgbE8AvCkasKXV+efkyPY4b7v+98LlTGYdVYgY8aN2O2x3djg0/fJfte g9ZYymEtQ1RSYK6C+zXiA8DJjnvMlydI2UX8MpCPXiaS5rRXpMCKn5AYJm+wm7pWfBfR +6R45wBbmRx5w8wQFJGwQkBRpMi/U9Xhl922vgdnpIzReDkPIXAWRvUNxrhl0VFhs9Mb r4ICxF1GIze/C6/OOavzmYTqzgAcSBwq5Z90eDyeflV/ESSpgWDmgrA8gd1/l68T/6ja Z/hw== X-Gm-Message-State: AOAM5317cOZxMPVWp4HA2RAIE/rXAyrOpbzAvrVQZAP6P3QxMMwSfiud NZN5B79Aanojq+G1MceJF3c= X-Google-Smtp-Source: ABdhPJy6QwfPsDeSz8vG6LOJLQ2/uWRfC75uRmK73T2NkVkZiIaIscK4eEPynLDHgaN6yoXR/bnJbA== X-Received: by 2002:a7b:c842:: with SMTP id c2mr24046309wml.100.1609707033988; Sun, 03 Jan 2021 12:50:33 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Huacai Chen , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson Subject: [PULL 02/35] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h' Date: Sun, 3 Jan 2021 21:49:48 +0100 Message-Id: <20210103205021.2837760-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210103205021.2837760-1-f4bug@amsat.org> References: <20210103205021.2837760-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) We already have a generic PCI_FUNC() macro in "hw/pci/pci.h" to extract the PCI function identifier, use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: David Gibson Message-Id: <20201012124506.3406909-4-philmd@redhat.com> --- hw/pci-host/uninorth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index 0c0a9ecee14..f0a4d8c7178 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -63,7 +63,7 @@ static uint32_t unin_get_config_reg(uint32_t reg, uint32_= t addr) if (slot =3D=3D 32) { slot =3D -1; /* XXX: should this be 0? */ } - func =3D (reg >> 8) & 7; + func =3D PCI_FUNC(reg >> 8); =20 /* ... and then convert them to x86 format */ /* config pointer */ --=20 2.26.2