From nobody Tue Nov 18 10:38:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) client-ip=209.85.221.45; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f45.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1609454970; cv=none; d=zohomail.com; s=zohoarc; b=JCpvnJRdr2yZZ/RAqhm5LYhj5VAULr40SNUpWVTnhm86HDN3P9frBUMZCBy/jPMdjVzXnVEZyQB+fQVe38DnRFRlWORO0Mf9/43s7HXd/C/N/U0G/eenL8+Vknv92BasW0LRWQMLGp1qJMuepQxPQPelRYS4Km0KDqKTgI1tfv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609454970; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y8tdHrr32AcTrGaePHWGuuNZrRgCCpLKfmCaddeiLIU=; b=RtPc2cPkWY+ZL9j6grIZ6Xa4fa1qWtl2O00xqLW6Gx3Ct1/BXx//Xvdspu8msgpJGh9hA9pMWBPC2sLpbBjDQga7bgr3nl/pXgLGjzTOE7wJiX/BrDc2d5eGOrF4NEnn1AINk0UnPJvoclS62NYxFxESlcNpqyGTEnMPqfzDpiA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.zohomail.com with SMTPS id 1609454970814624.9900066397579; Thu, 31 Dec 2020 14:49:30 -0800 (PST) Received: by mail-wr1-f45.google.com with SMTP id r3so21064256wrt.2 for ; Thu, 31 Dec 2020 14:49:30 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (239.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.239]) by smtp.gmail.com with ESMTPSA id o13sm49363262wrh.88.2020.12.31.14.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Dec 2020 14:49:28 -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=y8tdHrr32AcTrGaePHWGuuNZrRgCCpLKfmCaddeiLIU=; b=tIoU2fNFWfJO1TdguFoffRALA2Mb9w9Ky+qqy+g7/FpgFpR5M8vSjzYKPmH9FKTwWr ProVR81wDZWA9Yh0mtYGNs8iCvLsxYKRDkJzFPc7FxgVFRAe/CSLEOKy+76sW7/+kRqK BWgYCw2zLQluoNFOJ6S1eWOxKzYQGwlrhTr5KC+9nsg/anKu0bYgVAqS8xykIMM7uuc7 u8ON5KEeQ5nASfND2R6mXA/g0h2fBrW5g98i5L/MTiDmg9wo94KtEyde0upUW2Ofisj3 obQ7YUfN1ZHoe/AMChh54/yd1wSOYYkc+hSLOeUuGY1wGaTx6h9WLt9hG6T/giZq2sU1 3p0Q== 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=y8tdHrr32AcTrGaePHWGuuNZrRgCCpLKfmCaddeiLIU=; b=hCI9J+ZQaibAGzo0uFJN4z/vrMMxdWj1tzbdi7Q+E2a50FsIUCesJuF7r9xvV+akKe IAb5tdOaNDh4NRy6YrF9tzv8LPIOzZwN/KF4M19Z3sALs1bdYeXLzHJ5p3dxS+ec22G+ Tb5TnFAtuKBwS3PlB1xz7UCzCZRUN7faePigHXmBRMNYEXs+4amdxngTyw2CUyXGC4vL jeYNiYB2Z+vYyM0CCfybnQaxy+hc9PnF7WXkrBAQFXhM+95svwi5QGR951DFbunS/R7y gTgtUj4oz+K7i6lTXsdL2RNhIDIyO7mMJ8A7xN8ioFnN2LVCfFUNcQaAWepXviRFE+qN iWBw== X-Gm-Message-State: AOAM533SMeBrtVkcfnTw0SlxeAmKX+roQJIGpGa2/19Av3HwTJJRfAZ7 H2r8Plse73H83dtZnRVQ0Oo= X-Google-Smtp-Source: ABdhPJxl9Q0YxAwCTFKUW23rLMeEBfzrJOCLpgLuNLWHTkRvOxFwYb0NnDOpnmJ0tn/p8ACf5xxC4A== X-Received: by 2002:a5d:43d2:: with SMTP id v18mr66459196wrr.326.1609454969088; Thu, 31 Dec 2020 14:49:29 -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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Rikalo , Aurelien Jarno , Huacai Chen Subject: [PATCH 03/18] hw/pci-host/bonito: Use PCI_DEVFN() macro Date: Thu, 31 Dec 2020 23:48:56 +0100 Message-Id: <20201231224911.1467352-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201231224911.1467352-1-f4bug@amsat.org> References: <20201231224911.1467352-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) Use the PCI_DEVFN() macro to replace the '0x28' magic value, this way it is clearer we access PCI function #0 of slot #5. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Huacai Chen --- hw/pci-host/bonito.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index efeba29011f..4c903d4f682 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -626,7 +626,7 @@ static void bonito_pcihost_realize(DeviceState *dev, Er= ror **errp) phb->bus =3D pci_register_root_bus(dev, "pci", pci_bonito_set_irq, pci_bonito_map_ir= q, dev, &bs->pci_mem, get_system_io(), - 0x28, 32, TYPE_PCI_BUS); + PCI_DEVFN(5, 0), 32, TYPE_PCI_BUS); =20 for (size_t i =3D 0; i < 3; i++) { char *name =3D g_strdup_printf("pci.lomem%zu", i); --=20 2.26.2