[PATCH] m68k: use correct variable name in boot info string macro

Jason A. Donenfeld posted 1 patch 3 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220625152318.120849-1-Jason@zx2c4.com
Maintainers: Laurent Vivier <laurent@vivier.eu>
hw/m68k/bootinfo.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] m68k: use correct variable name in boot info string macro
Posted by Jason A. Donenfeld 3 years, 7 months ago
Every time this macro is used, the caller is passing in
"parameters_base", so this bug wasn't spotted. But the actual macro
variable name is "base", so use that instead.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 hw/m68k/bootinfo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/m68k/bootinfo.h b/hw/m68k/bootinfo.h
index adbf0c5521..ff4e155a3c 100644
--- a/hw/m68k/bootinfo.h
+++ b/hw/m68k/bootinfo.h
@@ -54,6 +54,6 @@
             stb_phys(as, base++, string[i]); \
         } \
         stb_phys(as, base++, 0); \
-        base = (parameters_base + 1) & ~1; \
+        base = (base + 1) & ~1; \
     } while (0)
 #endif
-- 
2.35.1
Re: [PATCH] m68k: use correct variable name in boot info string macro
Posted by Laurent Vivier 3 years, 7 months ago
Le 25/06/2022 à 17:23, Jason A. Donenfeld a écrit :
> Every time this macro is used, the caller is passing in
> "parameters_base", so this bug wasn't spotted. But the actual macro
> variable name is "base", so use that instead.
> 
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
>   hw/m68k/bootinfo.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/m68k/bootinfo.h b/hw/m68k/bootinfo.h
> index adbf0c5521..ff4e155a3c 100644
> --- a/hw/m68k/bootinfo.h
> +++ b/hw/m68k/bootinfo.h
> @@ -54,6 +54,6 @@
>               stb_phys(as, base++, string[i]); \
>           } \
>           stb_phys(as, base++, 0); \
> -        base = (parameters_base + 1) & ~1; \
> +        base = (base + 1) & ~1; \
>       } while (0)
>   #endif

Reviewed-by: Laurent Vivier <laurent@vivier.eu>