From nobody Tue Feb 10 23:00:41 2026 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; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1674838163; cv=none; d=zohomail.com; s=zohoarc; b=bgPAiFua9D+juupoCPchBd8p/NbcYBNdpzaCXXU/fk2U/aPe9fYNhW9gJthMiHb1LqZIkkCS1/w3fEY6JLq622BZ07+A5VW2pEn1JRxeDaiaxasTLud8RxhdimZ7cAMQuwz+Rv8zY+O6xDz6DEj7L2LmW6poDx+jYKmJpy4Ga4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674838163; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OJhCvhIhhKBnccqOEN+LTzcwGaza/ypgRY72rsH65ww=; b=ATsG0p0ZJHEtEsz+FArA0ormvclmnYcT7cGWYZSlIkXMJGhhglztXBuPNyeBEQ1VZ3KrgQ6TdHYePHyru99wXJU7VfCz0SIQoTWVAdO7d1p5MLMwjDKtndoaaM/dpyVAtulUrgzIIbiuYdyJSEc6i1fhxTzVbVagECX4BMcShzM= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1674838163229519.2381914071531; Fri, 27 Jan 2023 08:49:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLRtD-0002M6-IQ; Fri, 27 Jan 2023 11:47:47 -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 1pLRt4-0002IC-EA; Fri, 27 Jan 2023 11:47:38 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pLRt2-0005ed-RA; Fri, 27 Jan 2023 11:47:38 -0500 Received: by mail-ed1-x536.google.com with SMTP id cw4so123794edb.13; Fri, 27 Jan 2023 08:47:35 -0800 (PST) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id m15-20020a056402050f00b0049ef70a2894sm2574414edv.38.2023.01.27.08.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 08:47:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=OJhCvhIhhKBnccqOEN+LTzcwGaza/ypgRY72rsH65ww=; b=V7KbksY5OYO6zNCWK76b0mR+BF1yecjrADVJLUl9g7nglH92AAAcxaaECT5928Oi1S 123f7vS9KFHxt+rQ/rvZDDXC2VkTZo1zrhENG2vOaBmgZTx++7XbZaC+YUwOjTag4xAj iaRC7tMZ9E/cT0UYnWijiFy5p93LZLonn4PMG/Ezoi8TfpPFQvnyMqG/1fwDk5Cty8Lu F25BC571oUyxIV9tmc2uvEGPbOtEbgyRbbQY5hxfRW7vm2WJb7Y1RtUTHDyR7PiAQuQJ w0IxhiHwGGaUzMfw+4HUfAqW2BIAfGe8s8HiLeV5wmJ2BgKy2lBMoShgcE+DdK/CTUsa zJtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=OJhCvhIhhKBnccqOEN+LTzcwGaza/ypgRY72rsH65ww=; b=xWKs9leWkpZ90GyWgq1Q4FEeMNaZJk4z/cCCWr/qAdYdKdxgsU7Dg7uXZjrxEn/r/6 i7cBBXaWuCfjf8kcNYKlrUqTXcKGE39qg7jwD+Zsk9QErHJUElLGxoWr1nB7Pm6iCugM 49zkhrZcMMzmPrd4DuE3EPGdwhB6XbMHquJAcZxgpc0rALKfxecSQMa9bFTlMewyIwKz v7liSQm9lrdG81SK3cBHTCv/zeyMft1xXSJ/LFqJvKoeIvz7Q2OU3hS+j+FXq93W/J0G JFGnxMW5sTmFizSNmQg7E5gafVqIfs7IGLRSi5orqzU+BFlohL+NilSoS/R93FF682AY GXDQ== X-Gm-Message-State: AFqh2kqZ3g8boZoaBr4/1Rsph6TvGWsaohdqn9450/AftsB7bVNakLNq D8IN126p5djBtqu/3QC2/esrSyCODAteuA== X-Google-Smtp-Source: AMrXdXtKTej3q6ioYljEqJxvfGPJIsFxr91d++Sp0xrTErcpCsEGqgx6zk/dn69fjW45JCWCY/4OmA== X-Received: by 2002:a05:6402:2b92:b0:45a:7d2:9b35 with SMTP id fj18-20020a0564022b9200b0045a07d29b35mr42341259edb.0.1674838054747; Fri, 27 Jan 2023 08:47:34 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Paolo Bonzini , Richard Henderson , Marcel Apfelbaum , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Bernhard Beschow Subject: [PATCH 4/7] hw/i386/pc_q35: Resolve redundant q35_host variable Date: Fri, 27 Jan 2023 17:47:15 +0100 Message-Id: <20230127164718.98156-5-shentey@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230127164718.98156-1-shentey@gmail.com> References: <20230127164718.98156-1-shentey@gmail.com> 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=2a00:1450:4864:20::536; envelope-from=shentey@gmail.com; helo=mail-ed1-x536.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 @gmail.com) X-ZM-MESSAGEID: 1674838164315100006 Content-Type: text/plain; charset="utf-8" The variable is redundant to "phb" and is never used by its real type. Signed-off-by: Bernhard Beschow --- hw/i386/pc_q35.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 83c57c6eb1..dc94ce1081 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -118,7 +118,6 @@ static void pc_q35_init(MachineState *machine) PCMachineState *pcms =3D PC_MACHINE(machine); PCMachineClass *pcmc =3D PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms =3D X86_MACHINE(machine); - Q35PCIHost *q35_host; PCIHostState *phb; PCIBus *host_bus; PCIDevice *lpc; @@ -206,10 +205,10 @@ static void pc_q35_init(MachineState *machine) } =20 /* create pci host bus */ - q35_host =3D Q35_HOST_DEVICE(qdev_new(TYPE_Q35_HOST_DEVICE)); + phb =3D PCI_HOST_BRIDGE(qdev_new(TYPE_Q35_HOST_DEVICE)); =20 if (pcmc->pci_enabled) { - pci_hole64_size =3D object_property_get_uint(OBJECT(q35_host), + pci_hole64_size =3D object_property_get_uint(OBJECT(phb), PCI_HOST_PROP_PCI_HOLE6= 4_SIZE, &error_abort); } @@ -218,22 +217,21 @@ static void pc_q35_init(MachineState *machine) pc_memory_init(pcms, get_system_memory(), rom_memory, &ram_memory, pci_hole64_size); =20 - object_property_add_child(qdev_get_machine(), "q35", OBJECT(q35_host)); - object_property_set_link(OBJECT(q35_host), MCH_HOST_PROP_RAM_MEM, + object_property_add_child(OBJECT(machine), "q35", OBJECT(phb)); + object_property_set_link(OBJECT(phb), MCH_HOST_PROP_RAM_MEM, OBJECT(ram_memory), NULL); - object_property_set_link(OBJECT(q35_host), MCH_HOST_PROP_PCI_MEM, + object_property_set_link(OBJECT(phb), MCH_HOST_PROP_PCI_MEM, OBJECT(pci_memory), NULL); - object_property_set_link(OBJECT(q35_host), MCH_HOST_PROP_SYSTEM_MEM, + object_property_set_link(OBJECT(phb), MCH_HOST_PROP_SYSTEM_MEM, OBJECT(get_system_memory()), NULL); - object_property_set_link(OBJECT(q35_host), MCH_HOST_PROP_IO_MEM, + object_property_set_link(OBJECT(phb), MCH_HOST_PROP_IO_MEM, OBJECT(system_io), NULL); - object_property_set_int(OBJECT(q35_host), PCI_HOST_BELOW_4G_MEM_SIZE, + object_property_set_int(OBJECT(phb), PCI_HOST_BELOW_4G_MEM_SIZE, x86ms->below_4g_mem_size, NULL); - object_property_set_int(OBJECT(q35_host), PCI_HOST_ABOVE_4G_MEM_SIZE, + object_property_set_int(OBJECT(phb), PCI_HOST_ABOVE_4G_MEM_SIZE, x86ms->above_4g_mem_size, NULL); /* pci */ - sysbus_realize_and_unref(SYS_BUS_DEVICE(q35_host), &error_fatal); - phb =3D PCI_HOST_BRIDGE(q35_host); + sysbus_realize_and_unref(SYS_BUS_DEVICE(phb), &error_fatal); host_bus =3D phb->bus; /* create ISA bus */ lpc =3D pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_LPC_D= EV, --=20 2.39.1