[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/24] vt82c686: Use shorter name for local variable holding obje
From: |
BALATON Zoltan |
Subject: |
[PATCH 11/24] vt82c686: Use shorter name for local variable holding object state |
Date: |
Sat, 02 Jan 2021 11:43:35 +0100 |
Rename local variable holding object state for readability and
consistency.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
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 = {
static void vt82c686b_isa_reset(DeviceState *dev)
{
- VT82C686BISAState *vt82c = VT82C686B_ISA(dev);
- uint8_t *pci_conf = vt82c->dev.config;
+ VT82C686BISAState *s = VT82C686B_ISA(dev);
+ uint8_t *pci_conf = s->dev.config;
pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
@@ -112,24 +112,24 @@ static void vt82c686b_isa_reset(DeviceState *dev)
pci_conf[0x5f] = 0x04;
pci_conf[0x77] = 0x10; /* GPIO Control 1/2/3/4 */
- vt82c->superio_conf.config[0xe0] = 0x3c;
- vt82c->superio_conf.config[0xe2] = 0x03;
- vt82c->superio_conf.config[0xe3] = 0xfc;
- vt82c->superio_conf.config[0xe6] = 0xde;
- vt82c->superio_conf.config[0xe7] = 0xfe;
- vt82c->superio_conf.config[0xe8] = 0xbe;
+ s->superio_conf.config[0xe0] = 0x3c;
+ s->superio_conf.config[0xe2] = 0x03;
+ s->superio_conf.config[0xe3] = 0xfc;
+ s->superio_conf.config[0xe6] = 0xde;
+ s->superio_conf.config[0xe7] = 0xfe;
+ s->superio_conf.config[0xe8] = 0xbe;
}
/* 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 = VT82C686B_ISA(d);
+ VT82C686BISAState *s = VT82C686B_ISA(d);
trace_via_isa_write(addr, val, len);
pci_default_write_config(d, addr, val, len);
if (addr == 0x85) { /* enable or disable super IO configure */
- memory_region_set_enabled(&vt686->superio, val & 0x2);
+ memory_region_set_enabled(&s->superio, val & 0x2);
}
}
@@ -289,7 +289,7 @@ static const VMStateDescription vmstate_via = {
/* init the PCI-to-ISA bridge */
static void vt82c686b_realize(PCIDevice *d, Error **errp)
{
- VT82C686BISAState *vt82c = VT82C686B_ISA(d);
+ VT82C686BISAState *s = VT82C686B_ISA(d);
uint8_t *pci_conf;
ISABus *isa_bus;
uint8_t *wmask;
@@ -311,15 +311,15 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)
}
}
- 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);
}
static void via_class_init(ObjectClass *klass, void *data)
--
2.21.3
- [PATCH 03/24] vt82c686b: Rename VT82C686B to VT82C686B_ISA, (continued)
- [PATCH 03/24] vt82c686b: Rename VT82C686B to VT82C686B_ISA, BALATON Zoltan, 2021/01/02
- [PATCH 04/24] vt82c686: Remove vt82c686b_[am]c97_init() functions, BALATON Zoltan, 2021/01/02
- [PATCH 06/24] audio/via-ac97: Simplify code and set user_creatable to false, BALATON Zoltan, 2021/01/02
- [PATCH 08/24] vt82c686: Remove legacy vt82c686b_pm_init() function, BALATON Zoltan, 2021/01/02
- [PATCH 07/24] vt82c686: Remove legacy vt82c686b_isa_init() function, BALATON Zoltan, 2021/01/02
- [PATCH 09/24] vt82c686: Convert debug printf to trace points, BALATON Zoltan, 2021/01/02
- [PATCH 02/24] vt82c686: Remove unnecessary _DEVICE suffix from type macros, BALATON Zoltan, 2021/01/02
- [PATCH 05/24] vt82c686: Split off via-[am]c97 into separate file in hw/audio, BALATON Zoltan, 2021/01/02
- [PATCH 10/24] vt82c686: Remove unneeded includes and defines, BALATON Zoltan, 2021/01/02
- [PATCH 11/24] vt82c686: Use shorter name for local variable holding object state,
BALATON Zoltan <=
- [PATCH 13/24] vt82c686: Move superio memory region to SuperIOConfig struct, BALATON Zoltan, 2021/01/02
- [PATCH 21/24] vt82c686: Implement control of serial port io ranges via config regs, BALATON Zoltan, 2021/01/02
- [PATCH 20/24] vt82c686: Fix superio_cfg_{read,write}() functions, BALATON Zoltan, 2021/01/02
- [PATCH 23/24] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO, BALATON Zoltan, 2021/01/02
- [PATCH 18/24] vt82c686: Simplify vt82c686b_realize(), BALATON Zoltan, 2021/01/02
- [PATCH 15/24] vt82c686: Fix SMBus IO base and configuration registers, BALATON Zoltan, 2021/01/02
- [PATCH 17/24] vt82c686: Make vt82c686b-pm an abstract base class and add vt8231-pm based on it, BALATON Zoltan, 2021/01/02
- [PATCH 14/24] vt82c686: Reorganise code, BALATON Zoltan, 2021/01/02
- [PATCH 19/24] vt82c686: Move creation of ISA devices to the ISA bridge, BALATON Zoltan, 2021/01/02