From nobody Tue Nov 18 09:18:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609283675; cv=none; d=zohomail.com; s=zohoarc; b=Biga9IC/Zint+fRmXvPI2hvlmSKRQjbn254mHcATE106c5UuNKpXbRkDjauAT58qqr/LtZsAlJ8CzunFbc34wREVrmAW7I3PxVwelCLqIZR6lFZh3DOyIqiTvCSS91byKbNYqyCab8Bd5YSk4tt195x8Pq969dV5iBlxT9c1RQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609283675; h=Content-Type: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:Reply-To:References:Sender:Subject:To; bh=acG7oPWRH0JeoFqjY5rn/mzz9Lnb/ZrMmSClA9XbLXs=; b=mU38fXr45aGT/R/ReCGaCkbP94FSvjx00cartJxbtwRyerTrLZtw9yFphPkxgV6WoIDrAo8udofT8iMMsCSBbKbX1hiDgEG1RhisBMz0+tZmAacHr3ETB6Xzmlp0ihBNvY9DFEBUNxXnW6PMTpXUzz3j4BUWLKz+3uj8iWjGkRw= ARC-Authentication-Results: i=1; mx.zohomail.com; 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609283675747553.6013311073095; Tue, 29 Dec 2020 15:14:35 -0800 (PST) Received: from localhost ([::1]:50340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuOCI-0005nc-NB for importer@patchew.org; Tue, 29 Dec 2020 18:14:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuO80-00004y-IB for qemu-devel@nongnu.org; Tue, 29 Dec 2020 18:10:08 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:48956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuO7n-0006bf-9A for qemu-devel@nongnu.org; Tue, 29 Dec 2020 18:10:08 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 2DFC57470F1; Wed, 30 Dec 2020 00:09:52 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 9330F7470DB; Wed, 30 Dec 2020 00:09:51 +0100 (CET) Message-Id: In-Reply-To: References: Subject: [PATCH 1/7] vt82c686: Use shorter name for local variable holding object state Date: Tue, 29 Dec 2020 23:50:53 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% 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=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" Rename local variable holding object state for readability and consistency. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 02d6759c00..2633cfe7dc 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -95,8 +95,8 @@ static const MemoryRegionOps superio_ops =3D { =20 static void vt82c686b_isa_reset(DeviceState *dev) { - VT82C686BISAState *vt82c =3D VT82C686B_ISA(dev); - uint8_t *pci_conf =3D vt82c->dev.config; + VT82C686BISAState *s =3D VT82C686B_ISA(dev); + uint8_t *pci_conf =3D s->dev.config; =20 pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMO= RY | @@ -112,24 +112,24 @@ static void vt82c686b_isa_reset(DeviceState *dev) pci_conf[0x5f] =3D 0x04; pci_conf[0x77] =3D 0x10; /* GPIO Control 1/2/3/4 */ =20 - vt82c->superio_conf.config[0xe0] =3D 0x3c; - vt82c->superio_conf.config[0xe2] =3D 0x03; - vt82c->superio_conf.config[0xe3] =3D 0xfc; - vt82c->superio_conf.config[0xe6] =3D 0xde; - vt82c->superio_conf.config[0xe7] =3D 0xfe; - vt82c->superio_conf.config[0xe8] =3D 0xbe; + s->superio_conf.config[0xe0] =3D 0x3c; + s->superio_conf.config[0xe2] =3D 0x03; + s->superio_conf.config[0xe3] =3D 0xfc; + s->superio_conf.config[0xe6] =3D 0xde; + s->superio_conf.config[0xe7] =3D 0xfe; + s->superio_conf.config[0xe8] =3D 0xbe; } =20 /* write config pci function0 registers. PCI-ISA bridge */ static void vt82c686b_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int len) { - VT82C686BISAState *vt686 =3D VT82C686B_ISA(d); + VT82C686BISAState *s =3D VT82C686B_ISA(d); =20 trace_via_isa_write(addr, val, len); pci_default_write_config(d, addr, val, len); if (addr =3D=3D 0x85) { /* enable or disable super IO configure */ - memory_region_set_enabled(&vt686->superio, val & 0x2); + memory_region_set_enabled(&s->superio, val & 0x2); } } =20 @@ -289,7 +289,7 @@ static const VMStateDescription vmstate_via =3D { /* init the PCI-to-ISA bridge */ static void vt82c686b_realize(PCIDevice *d, Error **errp) { - VT82C686BISAState *vt82c =3D VT82C686B_ISA(d); + VT82C686BISAState *s =3D VT82C686B_ISA(d); uint8_t *pci_conf; ISABus *isa_bus; uint8_t *wmask; @@ -311,15 +311,15 @@ static void vt82c686b_realize(PCIDevice *d, Error **e= rrp) } } =20 - memory_region_init_io(&vt82c->superio, OBJECT(d), &superio_ops, - &vt82c->superio_conf, "superio", 2); - memory_region_set_enabled(&vt82c->superio, false); + memory_region_init_io(&s->superio, OBJECT(d), &superio_ops, + &s->superio_conf, "superio", 2); + memory_region_set_enabled(&s->superio, false); /* * The floppy also uses 0x3f0 and 0x3f1. * But we do not emulate a floppy, so just set it here. */ memory_region_add_subregion(isa_bus->address_space_io, 0x3f0, - &vt82c->superio); + &s->superio); } =20 static void via_class_init(ObjectClass *klass, void *data) --=20 2.21.3