From patchwork Wed Jan 4 14:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 13088655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6CBEC54EBE for ; Wed, 4 Jan 2023 14:45:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.471207.730996 (Exim 4.92) (envelope-from ) id 1pD51G-00086j-Ki; Wed, 04 Jan 2023 14:45:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 471207.730996; Wed, 04 Jan 2023 14:45:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pD51G-000842-BR; Wed, 04 Jan 2023 14:45:30 +0000 Received: by outflank-mailman (input) for mailman id 471207; Wed, 04 Jan 2023 14:45:29 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pD51E-00079b-O1 for xen-devel@lists.xenproject.org; Wed, 04 Jan 2023 14:45:28 +0000 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [2a00:1450:4864:20::42b]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6dea74b4-8c3e-11ed-91b6-6bf2151ebd3b; Wed, 04 Jan 2023 15:45:28 +0100 (CET) Received: by mail-wr1-x42b.google.com with SMTP id az7so8799947wrb.5 for ; Wed, 04 Jan 2023 06:45:28 -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 e10-20020a5d594a000000b0028663fc8f4csm21168241wri.30.2023.01.04.06.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 06:45:27 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6dea74b4-8c3e-11ed-91b6-6bf2151ebd3b 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=ZTbz96Fg6rdZNkQF03buq3nvArFrt1X2bnXBL/QETy8=; b=W9Un76kfIXX71algBT3MUyLCUiN80OFK1EUd0YbCe6wUItAP0Luda8qEceYXzOUdFw jY1QLBi8eG0gW8dCgOjygcJ+fp4QbyzP8Ye4eARwBnC9y0DkgijILW6lYwfh0Jwvet2r 4qrOldpBtix87pTunJpR5Hzs+5mBOue2wekAGVrS5ABa97Ub9oHHVlIjCdGw8E/QrMWt uF7+vwGjO6ufN4oR16pm29afZxpgs19LCt554cFbOcBl4NTLEdn0+fh7sb0bkFYX/Qy3 /7j2qYCvOrtcFrstpMIW3NJQlCJzKvvJDPW6GJrhHDp8NV6E0rozu/tgN7PiVc9LxJ4d rJkA== 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=ZTbz96Fg6rdZNkQF03buq3nvArFrt1X2bnXBL/QETy8=; b=hAnboLlHOS5i/VMcaI6yf68aOHJr0usBmCb06vuVRan5avil1+ldzlNf8eXIMIQg+l 4Deg6DYtiB0rLKw+6ctJXTWNvG0swLwt9S+h5CDOWnUZAwhVLSOpkz1zE5Z5n/0LIKdT lzpyzrvy0KBG2YW2cZ2s+BT+VA9AYOqK1IoIveKkec3kCjekl+/A2pMs9DOyCwa/QLS0 39aPNGn9Y7tpc8wO2jYD/0pVxmUoQKSSL1q+vuuDHquid8MnmNF3Z7+UOUBqvg434CiL Ao4jFao6FGw75Z/bM95D0vaEkZCvrImVlrhT6CulONXKUOxrfID+8HcsSwlOdKfY0hiw R6qA== X-Gm-Message-State: AFqh2krX0egy/g06wqU8ZS7NXEYaDE4gG1YDueJEapnq8Uqu3VUz+/+W N3Oef5fU7Ea3x6GYH+kWGl4= X-Google-Smtp-Source: AMrXdXuqwFIIXGumdoGoKi2S2o1kZi2sGwiXEGMwUaQU6kBeT44weD6z/UJouVJiTGdquTAHfyXG3g== X-Received: by 2002:a5d:640c:0:b0:2a3:1c13:2888 with SMTP id z12-20020a5d640c000000b002a31c132888mr2471851wru.60.1672843527498; Wed, 04 Jan 2023 06:45:27 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Stefano Stabellini , xen-devel@lists.xenproject.org, =?utf-8?q?Herv=C3=A9_Poussineau?= , Aurelien Jarno , Paul Durrant , Marcel Apfelbaum , Anthony Perard , "Michael S. Tsirkin" , Paolo Bonzini , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Chuck Zmudzinski , Bernhard Beschow Subject: [PATCH v2 5/6] hw/isa/piix: Resolve redundant k->config_write assignments Date: Wed, 4 Jan 2023 15:44:36 +0100 Message-Id: <20230104144437.27479-6-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230104144437.27479-1-shentey@gmail.com> References: <20230104144437.27479-1-shentey@gmail.com> MIME-Version: 1.0 The previous patch unified handling of piix_write_config() accross all PIIX device models which allows for assigning k->config_write once in the base class. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/piix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/isa/piix.c b/hw/isa/piix.c index d4cdb3dadb..98e9b12661 100644 --- a/hw/isa/piix.c +++ b/hw/isa/piix.c @@ -396,6 +396,7 @@ static void pci_piix_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass); + k->config_write = piix_write_config; dc->reset = piix_reset; dc->desc = "ISA bridge"; dc->hotpluggable = false; @@ -451,7 +452,6 @@ static void piix3_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - k->config_write = piix_write_config; k->realize = piix3_realize; /* 82371SB PIIX3 PCI-to-ISA bridge (Step A1) */ k->device_id = PCI_DEVICE_ID_INTEL_82371SB_0; @@ -470,7 +470,6 @@ static void piix3_xen_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - k->config_write = piix_write_config; k->realize = piix3_realize; /* 82371SB PIIX3 PCI-to-ISA bridge (Step A1) */ k->device_id = PCI_DEVICE_ID_INTEL_82371SB_0; @@ -519,7 +518,6 @@ static void piix4_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - k->config_write = piix_write_config; k->realize = piix4_realize; k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0; dc->vmsd = &vmstate_piix4;