From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
qemu-devel@nongnu.org
Cc: arikalo@wavecomp.com, f4bug@amsat.org, amarkovic@wavecomp.com
Subject: Re: [Qemu-devel] [PATCH 2/2] dma/rc4030: Minor code style cleanup
Date: Tue, 2 Jul 2019 06:43:27 +0200 [thread overview]
Message-ID: <3b3a712d-4a96-ce42-4ac5-ae485b77890b@reactos.org> (raw)
In-Reply-To: <1561472838-32272-3-git-send-email-aleksandar.markovic@rt-rk.com>
Le 25/06/2019 à 16:27, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> Fix some simple checkpatch.pl warnings in rc4030.c.
>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
> hw/dma/rc4030.c | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
> index 88ff271..155af9b 100644
> --- a/hw/dma/rc4030.c
> +++ b/hw/dma/rc4030.c
> @@ -58,8 +58,8 @@ typedef struct dma_pagetable_entry {
>
> #define TYPE_RC4030_IOMMU_MEMORY_REGION "rc4030-iommu-memory-region"
>
> -typedef struct rc4030State
> -{
> +typedef struct rc4030State {
> +
> SysBusDevice parent;
>
> uint32_t config; /* 0x0000: RC4030 config register */
> @@ -152,8 +152,9 @@ static uint64_t rc4030_read(void *opaque, hwaddr addr, unsigned int size)
> case 0x0058:
> val = s->cache_bmask;
> /* HACK */
> - if (s->cache_bmask == (uint32_t)-1)
> + if (s->cache_bmask == (uint32_t)-1) {
> s->cache_bmask = 0;
> + }
> break;
> /* Remote Speed Registers */
> case 0x0070:
> @@ -538,8 +539,9 @@ static void rc4030_reset(DeviceState *dev)
>
> s->memory_refresh_rate = 0x18186;
> s->nvram_protect = 7;
> - for (i = 0; i < 15; i++)
> + for (i = 0; i < 15; i++) {
> s->rem_speed[i] = 7;
> + }
> s->imr_jazz = 0x10; /* XXX: required by firmware, but why? */
> s->isr_jazz = 0;
>
> @@ -551,7 +553,7 @@ static void rc4030_reset(DeviceState *dev)
>
> static int rc4030_post_load(void *opaque, int version_id)
> {
> - rc4030State* s = opaque;
> + rc4030State *s = opaque;
>
> set_next_tick(s);
> update_jazz_irq(s);
> @@ -591,7 +593,8 @@ static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_wri
> hwaddr dma_addr;
> int dev_to_mem;
>
> - s->dma_regs[n][DMA_REG_ENABLE] &= ~(DMA_FLAG_TC_INTR | DMA_FLAG_MEM_INTR | DMA_FLAG_ADDR_INTR);
> + s->dma_regs[n][DMA_REG_ENABLE] &=
> + ~(DMA_FLAG_TC_INTR | DMA_FLAG_MEM_INTR | DMA_FLAG_ADDR_INTR);
>
> /* Check DMA channel consistency */
> dev_to_mem = (s->dma_regs[n][DMA_REG_ENABLE] & DMA_FLAG_MEM_TO_DEV) ? 0 : 1;
> @@ -603,8 +606,9 @@ static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_wri
> }
>
> /* Get start address and len */
> - if (len > s->dma_regs[n][DMA_REG_COUNT])
> + if (len > s->dma_regs[n][DMA_REG_COUNT]) {
> len = s->dma_regs[n][DMA_REG_COUNT];
> + }
> dma_addr = s->dma_regs[n][DMA_REG_ADDRESS];
>
> /* Read/write data at right place */
>
prev parent reply other threads:[~2019-07-02 4:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 14:27 [Qemu-devel] [PATCH 0/2] target/mips: jazz: rc4030: Minor cleanups Aleksandar Markovic
2019-06-25 14:27 ` [Qemu-devel] [PATCH 1/2] dma/rc4030: Fix off-by-one error in specified memory region size Aleksandar Markovic
2019-06-25 14:34 ` Aleksandar Rikalo
2019-06-25 14:39 ` Philippe Mathieu-Daudé
2019-07-02 4:43 ` Hervé Poussineau
2019-06-25 14:27 ` [Qemu-devel] [PATCH 2/2] dma/rc4030: Minor code style cleanup Aleksandar Markovic
2019-06-25 14:33 ` Aleksandar Rikalo
2019-06-25 14:40 ` Philippe Mathieu-Daudé
2019-07-02 4:43 ` Hervé Poussineau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3b3a712d-4a96-ce42-4ac5-ae485b77890b@reactos.org \
--to=hpoussin@reactos.org \
--cc=aleksandar.markovic@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=arikalo@wavecomp.com \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).