From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>,
Mark Langsdorf <mark.langsdorf@calxeda.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/arm/highbank: Simplify code (memory region in device state)
Date: Fri, 06 Dec 2013 23:12:57 +0400 [thread overview]
Message-ID: <52A221B9.4040407@msgid.tls.msk.ru> (raw)
In-Reply-To: <1386355410-10805-1-git-send-email-sw@weilnetz.de>
06.12.2013 22:43, Stefan Weil wrote:
> The memory region can be included by value instead of by reference in the
> device state (like it is done in other SoCs).
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> hw/arm/highbank.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
> index fe98ef1..54384b3 100644
> --- a/hw/arm/highbank.c
> +++ b/hw/arm/highbank.c
> @@ -125,7 +125,7 @@ typedef struct {
> SysBusDevice parent_obj;
> /*< public >*/
>
> - MemoryRegion *iomem;
> + MemoryRegion iomem;
> uint32_t regs[NUM_REGS];
> } HighbankRegsState;
Don't we have active maintainer for arm? (Who is Cc'd on the original patch).
> @@ -154,10 +154,9 @@ static int highbank_regs_init(SysBusDevice *dev)
> {
> HighbankRegsState *s = HIGHBANK_REGISTERS(dev);
>
> - s->iomem = g_new(MemoryRegion, 1);
> - memory_region_init_io(s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
> + memory_region_init_io(&s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
> "highbank_regs", 0x1000);
I know right to nothing about arm, does it have any alignment requiriments,
which may break here?
Thanks,
/mjt
next prev parent reply other threads:[~2013-12-06 19:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 18:43 [Qemu-devel] [PATCH] hw/arm/highbank: Simplify code (memory region in device state) Stefan Weil
2013-12-06 19:12 ` Michael Tokarev [this message]
2013-12-06 19:24 ` [Qemu-devel] [Qemu-trivial] " Peter Maydell
2013-12-07 6:46 ` Peter Crosthwaite
2013-12-07 18:21 ` Michael Tokarev
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=52A221B9.4040407@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=mark.langsdorf@calxeda.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/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).