qemu-devel
[Top][All Lists]
Advanced

[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: Gavin Shan
Subject: Re: [PATCH-for-9.0 20/25] hw: Simplify memory_region_init_ram() calls
Date: Mon, 4 Dec 2023 15:00:56 +1000
User-agent: Mozilla Thunderbird

On 11/21/23 07:32, 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 ++----
  hw/arm/fsl-imx25.c      | 6 ++----
  hw/arm/fsl-imx31.c      | 6 ++----
  hw/arm/fsl-imx6.c       | 6 ++----
  hw/arm/integratorcp.c   | 7 ++-----
  hw/arm/nrf51_soc.c      | 7 ++-----
  hw/ppc/rs6000_mc.c      | 7 ++-----
  8 files changed, 16 insertions(+), 35 deletions(-)


Reviewed-by: Gavin Shan <gshan@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]