summaryrefslogtreecommitdiffstats
path: root/hw/isa/vt82c686.c
diff options
context:
space:
mode:
authorFilip Bozuta2019-12-06 14:58:07 +0100
committerAleksandar Markovic2019-12-16 13:16:15 +0100
commitf3db354ca4435ce5347f87f06a3e706f0685ecd2 (patch)
tree5226da27b61ea84424cab07c8df6d76d294c9f10 /hw/isa/vt82c686.c
parentmips: r4000: Renovate coding style (diff)
downloadqemu-f3db354ca4435ce5347f87f06a3e706f0685ecd2.tar.gz
qemu-f3db354ca4435ce5347f87f06a3e706f0685ecd2.tar.xz
qemu-f3db354ca4435ce5347f87f06a3e706f0685ecd2.zip
mips: fulong 2e: Renovate coding style
The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_fulong2e.c hw/isa/vt82c686.c hw/pci-host/bonito.c include/hw/isa/vt82c686.h These mips Fulong 2E machine files were edited and all the errors and warrings generated by the checkpatch.pl script were corrected and then the script was ran again to make sure there are no more errors and warnings. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1575640687-20744-6-git-send-email-Filip.Bozuta@rt-rk.com>
Diffstat (limited to 'hw/isa/vt82c686.c')
-rw-r--r--hw/isa/vt82c686.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 616f67f347..f828708b1d 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -27,7 +27,7 @@
#include "qemu/timer.h"
#include "exec/address-spaces.h"
-//#define DEBUG_VT82C686B
+/* #define DEBUG_VT82C686B */
#ifdef DEBUG_VT82C686B
#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
@@ -35,8 +35,7 @@
#define DPRINTF(fmt, ...)
#endif
-typedef struct SuperIOConfig
-{
+typedef struct SuperIOConfig {
uint8_t config[0x100];
uint8_t index;
uint8_t data;
@@ -102,7 +101,7 @@ static uint64_t superio_ioport_readb(void *opaque, hwaddr addr, unsigned size)
SuperIOConfig *superio_conf = opaque;
DPRINTF("superio_ioport_readb address 0x%x\n", addr);
- return (superio_conf->config[superio_conf->index]);
+ return superio_conf->config[superio_conf->index];
}
static const MemoryRegionOps superio_ops = {
@@ -143,7 +142,7 @@ static void vt82c686b_isa_reset(DeviceState *dev)
}
/* write config pci function0 registers. PCI-ISA bridge */
-static void vt82c686b_write_config(PCIDevice * d, uint32_t address,
+static void vt82c686b_write_config(PCIDevice *d, uint32_t address,
uint32_t val, int len)
{
VT82C686BState *vt686 = VT82C686B_DEVICE(d);
@@ -365,7 +364,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp)
pci_set_long(pci_conf + 0x48, 0x00000001);
/* SMB ports:0xeee0~0xeeef */
- s->smb_io_base =((s->smb_io_base & 0xfff0) + 0x0);
+ s->smb_io_base = ((s->smb_io_base & 0xfff0) + 0x0);
pci_conf[0x90] = s->smb_io_base | 1;
pci_conf[0x91] = s->smb_io_base >> 8;
pci_conf[0xd2] = 0x90;
@@ -462,16 +461,18 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)
wmask = d->wmask;
for (i = 0x00; i < 0xff; i++) {
- if (i<=0x03 || (i>=0x08 && i<=0x3f)) {
- wmask[i] = 0x00;
- }
+ if (i <= 0x03 || (i >= 0x08 && i <= 0x3f)) {
+ wmask[i] = 0x00;
+ }
}
memory_region_init_io(&vt82c->superio, OBJECT(d), &superio_ops,
&vt82c->superio_conf, "superio", 2);
memory_region_set_enabled(&vt82c->superio, false);
- /* The floppy also uses 0x3f0 and 0x3f1.
- * But we do not emulate a floppy, so just set it here. */
+ /*
+ * 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);
}