[PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable

Bernhard Beschow posted 6 patches 3 years, 1 month ago
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
[PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable
Posted by Bernhard Beschow 3 years, 1 month ago
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 hw/ppc/virtex_ml507.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 13cace229b..f2f81bd425 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -157,7 +157,7 @@ static int xilinx_load_device_tree(MachineState *machine,
     int r;
     const char *dtb_filename;
 
-    dtb_filename = current_machine->dtb;
+    dtb_filename = machine->dtb;
     if (dtb_filename) {
         fdt = load_device_tree(dtb_filename, &fdt_size);
         if (!fdt) {
-- 
2.39.0
Re: [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable
Posted by Philippe Mathieu-Daudé 3 years, 1 month ago
On 16/12/22 15:57, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>   hw/ppc/virtex_ml507.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 13cace229b..f2f81bd425 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -157,7 +157,7 @@ static int xilinx_load_device_tree(MachineState *machine,
>       int r;
>       const char *dtb_filename;
>   
> -    dtb_filename = current_machine->dtb;
> +    dtb_filename = machine->dtb;

https://lore.kernel.org/qemu-devel/20200109152133.23649-1-philmd@redhat.com/

\o/

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



Re: [PATCH 3/6] hw/ppc/virtex_ml507: Prefer local over global variable
Posted by Edgar E. Iglesias 3 years, 1 month ago
On Fri, Dec 16, 2022 at 03:57:06PM +0100, Bernhard Beschow wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>

Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>


> ---
>  hw/ppc/virtex_ml507.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 13cace229b..f2f81bd425 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -157,7 +157,7 @@ static int xilinx_load_device_tree(MachineState *machine,
>      int r;
>      const char *dtb_filename;
>  
> -    dtb_filename = current_machine->dtb;
> +    dtb_filename = machine->dtb;
>      if (dtb_filename) {
>          fdt = load_device_tree(dtb_filename, &fdt_size);
>          if (!fdt) {
> -- 
> 2.39.0
>