qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH-for-7.0 2/5] hw/display/vga-mmio: Inline vga_mm_init()
Date: Mon, 22 Nov 2021 16:08:29 +0100	[thread overview]
Message-ID: <e4f267c5-3919-bcba-994e-23eb976950b1@redhat.com> (raw)
In-Reply-To: <20211119171202.458919-3-f4bug@amsat.org>

On 19/11/2021 18.11, Philippe Mathieu-Daudé wrote:
> Inline vga_mm_init() in vga_mmio_init() to simplify the
> next patch review. Kind of.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/display/vga-mmio.c | 27 ++++++++++-----------------
>   1 file changed, 10 insertions(+), 17 deletions(-)
> 
> diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c
> index 8aaf44e7b1d..0aefbcf53a0 100644
> --- a/hw/display/vga-mmio.c
> +++ b/hw/display/vga-mmio.c
> @@ -65,12 +65,19 @@ static const MemoryRegionOps vga_mm_ctrl_ops = {
>       .endianness = DEVICE_NATIVE_ENDIAN,
>   };
>   
> -static void vga_mm_init(VGAMmioState *s, hwaddr vram_base,
> -                        hwaddr ctrl_base, int it_shift,
> -                        MemoryRegion *address_space)
> +int vga_mmio_init(hwaddr vram_base,
> +                    hwaddr ctrl_base, int it_shift,
> +                    MemoryRegion *address_space)
>   {
> +    VGAMmioState *s;
>       MemoryRegion *s_ioport_ctrl, *vga_io_memory;
>   
> +    s = g_malloc0(sizeof(*s));
> +
> +    s->vga.vram_size_mb = VGA_RAM_SIZE / MiB;
> +    s->vga.global_vmstate = true;
> +    vga_common_init(&s->vga, NULL);
> +
>       s->it_shift = it_shift;
>       s_ioport_ctrl = g_malloc(sizeof(*s_ioport_ctrl));
>       memory_region_init_io(s_ioport_ctrl, NULL, &vga_mm_ctrl_ops, s,
> @@ -89,20 +96,6 @@ static void vga_mm_init(VGAMmioState *s, hwaddr vram_base,
>       memory_region_add_subregion(address_space,
>                                   vram_base + 0x000a0000, vga_io_memory);
>       memory_region_set_coalescing(vga_io_memory);
> -}
> -
> -int vga_mmio_init(hwaddr vram_base,
> -                    hwaddr ctrl_base, int it_shift,
> -                    MemoryRegion *address_space)

Preferably with the indentation fixed (already in the first patch):

Reviewed-by: Thomas Huth <thuth@redhat.com>



  parent reply	other threads:[~2021-11-22 15:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 17:11 [PATCH-for-7.0 0/5] hw/display: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO Philippe Mathieu-Daudé
2021-11-19 17:11 ` [PATCH-for-7.0 1/5] hw/display: Rename VGA_ISA_MM -> VGA_MMIO Philippe Mathieu-Daudé
2021-11-19 18:15   ` BALATON Zoltan
2021-11-22 15:06   ` Thomas Huth
2021-11-19 17:11 ` [PATCH-for-7.0 2/5] hw/display/vga-mmio: Inline vga_mm_init() Philippe Mathieu-Daudé
2021-11-19 18:20   ` BALATON Zoltan
2021-11-19 18:23     ` BALATON Zoltan
2021-11-19 18:28     ` Philippe Mathieu-Daudé
2021-11-22 15:08   ` Thomas Huth [this message]
2021-11-19 17:12 ` [PATCH-for-7.0 3/5] hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO Philippe Mathieu-Daudé
2021-11-19 18:40   ` BALATON Zoltan
2021-11-19 17:12 ` [PATCH-for-7.0 4/5] hw/mips/jazz: Inline vga_mmio_init() and remove it Philippe Mathieu-Daudé
2021-11-19 18:43   ` BALATON Zoltan
2021-11-19 17:12 ` [NOTFORMERGE PATCH 5/5] tests/avocado: Test NetBSD 9.2 on the Jazz Magnum machine Philippe Mathieu-Daudé
2021-11-22 20:05   ` Willian Rampazzo

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=e4f267c5-3919-bcba-994e-23eb976950b1@redhat.com \
    --to=thuth@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=hpoussin@reactos.org \
    --cc=kraxel@redhat.com \
    --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).