From nobody Tue Apr 15 12:28:43 2025 Delivered-To: importer@patchew.org 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; 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; dmarc=pass(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158160586553159.33762749276684; Thu, 13 Feb 2020 06:57:45 -0800 (PST) Received: from localhost ([::1]:54060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Fvz-0007Ou-6S for importer@patchew.org; Thu, 13 Feb 2020 09:57:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60158) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Fgl-0004Cr-PW for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2Fgk-0001Zb-O3 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:41:59 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:52729) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2Fgk-0001XX-Hr for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:41:58 -0500 Received: by mail-wm1-x32a.google.com with SMTP id p9so6540515wmc.2 for ; Thu, 13 Feb 2020 06:41:58 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e22sm3362454wme.45.2020.02.13.06.41.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 06:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=EvzEX/npkzNudVNtgehSYV+xP5AkZNjc9J75BB9mrvE=; b=kiP4b49LQ0rcT0I6Ae8+jCGnTsTL5Y6MFNColumoBgaAyluudauZ6YFwoHAVVT+XVH EcuoTMHkVLV3Yc0gWjaccrDRhKXbk7eBnxwLgtcruDzgErhVf5gBuvXyZSYryt8sY7hu DXs9Fdw0Tcl+0fmbzxJeX05KJLyEKx6slObYXZFwhi+DYiGt2vwC/HXx8r20AmjuTJ8C BMUo/HNmYBnBx466X9nrwjHYnQEVFmnhRSjusuS3LpheGmSsZLTxEmoq3y565WM9ljFy /0X1ZDOh2p2JCCsFOZX4U18fyiPy6N1L6aA6TLM9eesVtU4xEU6sCcLuic/hwj645vtq qRug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EvzEX/npkzNudVNtgehSYV+xP5AkZNjc9J75BB9mrvE=; b=qoYnwoCoHFi5WHhg2qcHkOZF3crh5UQ7KR2mJQyDfrefrKpz5kcIlGuSNJlVaG8p/U 4qd9p/tbEw44sK/Z6zE4yAxz516go8qZVNzo5mPQTCFNEwVGU9WN+vQ9S+kER3qTaaQV TGIx8rLCTjPKuCrIK00Jr61SMd81xZy51aTjAADSqw4nqrvGGKJ+HGCptKcU4tONBbHO nYirmr8nTYICQml6G6AzaCLGaiUiADWtn9srtQv6/vhQ5Sz7200rjd5CyHvixoiZ9Sci 2Ak4WV75n7jMb4jHxeJfUSlG2VCzsVADddge8WEUOGqvL5ztc/75Pf7jpNmSGhvRjmOz 9CWg== X-Gm-Message-State: APjAAAVLrKq7UMmO2IWnDZ03y/3NsHFIccibDId2rq6TvplAsVMNLoVB /vgQyVigi1sTQQwtH66G4QAvhv+tDzI= X-Google-Smtp-Source: APXvYqwIziJ2N0bGB8ub4aNUGx5Jw/tz+t8RL3CVeNLRxm0NARf8oEh94E1L/XMTb+VJq0Uhl7kQqQ== X-Received: by 2002:a1c:b7c4:: with SMTP id h187mr6511058wmf.105.1581604916910; Thu, 13 Feb 2020 06:41:56 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/46] arm/acpi: simplify the description of PCI _CRS Date: Thu, 13 Feb 2020 14:41:07 +0000 Message-Id: <20200213144145.818-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213144145.818-1-peter.maydell@linaro.org> References: <20200213144145.818-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Heyi Guo The original code defines a named object for the resource template but then returns the resource template object itself; the resulted output is like below: Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x0000, // Range Minimum 0x00FF, // Range Maximum 0x0000, // Translation Offset 0x0100, // Length ,, ) ...... }) Return (ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x0000, // Range Minimum 0x00FF, // Range Maximum 0x0000, // Translation Offset 0x0100, // Length ,, ) ...... }) } So the named object "RBUF" is actually useless. The more natural way is to return RBUF instead, or simply drop RBUF definition. Choose the latter one to simplify the code. Signed-off-by: Heyi Guo Reviewed-by: Michael S. Tsirkin Message-id: 20200204014325.16279-7-guoheyi@huawei.com Signed-off-by: Peter Maydell --- hw/arm/virt-acpi-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index f3e340b1729..fb4b166f82c 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -236,7 +236,6 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapE= ntry *memmap, size_mmio_high)); } =20 - aml_append(method, aml_name_decl("RBUF", rbuf)); aml_append(method, aml_return(rbuf)); aml_append(dev, method); =20 --=20 2.20.1