qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-9.0 24/25] hw/nvram: Simplify memory_region_init_rom_devi


From: Gavin Shan
Subject: Re: [PATCH-for-9.0 24/25] hw/nvram: Simplify memory_region_init_rom_device() calls
Date: Mon, 4 Dec 2023 15:03:07 +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, arg5, arg6, errp;
@@
-   memory_region_init_rom_device(mr, owner, arg3, arg4, arg5, arg6, &errp);
     if (
-       errp
+       !memory_region_init_rom_device(mr, owner, arg3, arg4, arg5, arg6, &errp)
     ) {
         ...
         return;
     }

and removing the local Error variable.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/nvram/nrf51_nvm.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

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




reply via email to

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