[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-9.0 20/25] hw: Simplify memory_region_init_ram() calls
From: |
Andrew Jeffery |
Subject: |
Re: [PATCH-for-9.0 20/25] hw: Simplify memory_region_init_ram() calls |
Date: |
Mon, 27 Nov 2023 11:31:05 +1030 |
User-agent: |
Evolution 3.46.4-2 |
On Mon, 2023-11-20 at 22:32 +0100, Philippe Mathieu-Daudé wrote:
> Mechanical change using the following coccinelle script:
>
> @@
> expression mr, owner, arg3, arg4, errp;
> @@
> - memory_region_init_ram(mr, owner, arg3, arg4, &errp);
> if (
> - errp
> + !memory_region_init_ram(mr, owner, arg3, arg4, &errp)
> ) {
> ...
> return;
> }
>
> and removing the local Error variable.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/arm/aspeed_ast2400.c | 6 ++----
> hw/arm/aspeed_ast2600.c | 6 ++----
For my own benefit it looks like the motivating thread for this series
is:
https://lore.kernel.org/qemu-devel/936e1ac4-cef8-08b4-c688-e5b1e057208b@linaro.org/
Anyway,
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> # aspeed
- [PATCH-for-9.0 17/25] backends: Reduce variable scope in host_memory_backend_memory_complete, (continued)
- [PATCH-for-9.0 17/25] backends: Reduce variable scope in host_memory_backend_memory_complete, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 16/25] backends: Have HostMemoryBackendClass::alloc() handler return a boolean, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 18/25] util/oslib: Have qemu_prealloc_mem() handler return a boolean, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 19/25] misc: Simplify qemu_prealloc_mem() calls, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 20/25] hw: Simplify memory_region_init_ram() calls, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 21/25] hw/arm: Simplify memory_region_init_rom() calls, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 22/25] hw/sparc: Simplify memory_region_init_ram_nomigrate() calls, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 23/25] hw/misc: Simplify memory_region_init_ram_from_fd() calls, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 24/25] hw/nvram: Simplify memory_region_init_rom_device() calls, Philippe Mathieu-Daudé, 2023/11/20
- [PATCH-for-9.0 25/25] hw/pci-host/raven: Propagate error in raven_realize(), Philippe Mathieu-Daudé, 2023/11/20