summaryrefslogtreecommitdiffstats
path: root/hw/dma
diff options
context:
space:
mode:
authorFilip Bozuta2019-12-06 14:58:03 +0100
committerAleksandar Markovic2019-12-16 13:04:46 +0100
commit68fa5f552ac2846251ad1025829799a515b16f11 (patch)
tree8b3d2e2e03986c7945297a9934f1dc7b786692bd /hw/dma
parentMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ... (diff)
downloadqemu-68fa5f552ac2846251ad1025829799a515b16f11.tar.gz
qemu-68fa5f552ac2846251ad1025829799a515b16f11.tar.xz
qemu-68fa5f552ac2846251ad1025829799a515b16f11.zip
mips: jazz: Renovate coding style
The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_jazz.c hw/display/jazz_led.c hw/dma/rc4030.c All these mips jazz 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-2-git-send-email-Filip.Bozuta@rt-rk.com>
Diffstat (limited to 'hw/dma')
-rw-r--r--hw/dma/rc4030.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index d54e296d3a..c4cf8236f4 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -397,10 +397,11 @@ static void update_jazz_irq(rc4030State *s)
pending = s->isr_jazz & s->imr_jazz;
- if (pending != 0)
+ if (pending != 0) {
qemu_irq_raise(s->jazz_bus_irq);
- else
+ } else {
qemu_irq_lower(s->jazz_bus_irq);
+ }
}
static void rc4030_irq_jazz_request(void *opaque, int irq, int level)
@@ -588,7 +589,8 @@ static const VMStateDescription vmstate_rc4030 = {
}
};
-static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_write)
+static void rc4030_do_dma(void *opaque, int n, uint8_t *buf,
+ int len, int is_write)
{
rc4030State *s = opaque;
hwaddr dma_addr;
@@ -643,8 +645,8 @@ static rc4030_dma *rc4030_allocate_dmas(void *opaque, int n)
struct rc4030DMAState *p;
int i;
- s = (rc4030_dma *)g_malloc0(sizeof(rc4030_dma) * n);
- p = (struct rc4030DMAState *)g_malloc0(sizeof(struct rc4030DMAState) * n);
+ s = (rc4030_dma *)g_new0(rc4030_dma, n);
+ p = (struct rc4030DMAState *)g_new0(struct rc4030DMAState, n);
for (i = 0; i < n; i++) {
p->opaque = opaque;
p->n = i;