[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/35] vt82c686: Use shorter name for local variable holding objec
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 17/35] vt82c686: Use shorter name for local variable holding object state |
Date: |
Sun, 3 Jan 2021 21:50:03 +0100 |
From: BALATON Zoltan <balaton@eik.bme.hu>
Rename local variable holding object state for readability and
consistency.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id:
<69655b23df2ecebbf0aff29726f4b4746f5b74de.1609584216.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
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 02d6759c00b..2633cfe7dc7 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.26.2
- [PULL 06/35] hw/pci-host/bonito: Use pci_config_set_interrupt_pin(), (continued)
- [PULL 06/35] hw/pci-host/bonito: Use pci_config_set_interrupt_pin(), Philippe Mathieu-Daudé, 2021/01/03
- [PULL 07/35] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 08/35] vt82c686: Remove unnecessary _DEVICE suffix from type macros, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 09/35] vt82c686: Rename VT82C686B to VT82C686B_ISA, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 10/35] vt82c686: Remove vt82c686b_[am]c97_init() functions, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 11/35] vt82c686: Split off via-[am]c97 into separate file in hw/audio, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 12/35] audio/via-ac97: Simplify code and set user_creatable to false, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 13/35] vt82c686: Remove legacy vt82c686b_isa_init() function, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 14/35] vt82c686: Remove legacy vt82c686b_pm_init() function, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 15/35] vt82c686: Convert debug printf to trace points, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 17/35] vt82c686: Use shorter name for local variable holding object state,
Philippe Mathieu-Daudé <=
- [PULL 16/35] vt82c686: Remove unneeded includes and defines, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 18/35] vt82c686: Rename superio config related parts, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 19/35] clock: Introduce clock_ticks_to_ns(), Philippe Mathieu-Daudé, 2021/01/03
- [PULL 20/35] target/mips: Don't use clock_get_ns() in clock period calculation, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 21/35] clock: Remove clock_get_ns(), Philippe Mathieu-Daudé, 2021/01/03
- [PULL 22/35] clock: Define and use new clock_display_freq(), Philippe Mathieu-Daudé, 2021/01/03
- [PULL 24/35] hw/mips: Implement fw_cfg_arch_key_name(), Philippe Mathieu-Daudé, 2021/01/03
- [PULL 23/35] hw/intc: Rework Loongson LIOINTC, Philippe Mathieu-Daudé, 2021/01/03