[PATCH-for-6.2] hw/i386/microvm: Reduce annoying debug message in dt_setup_microvm()

Philippe Mathieu-Daudé posted 1 patch 2 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211117174331.1715144-1-philmd@redhat.com
hw/i386/microvm-dt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH-for-6.2] hw/i386/microvm: Reduce annoying debug message in dt_setup_microvm()
Posted by Philippe Mathieu-Daudé 2 years, 5 months ago
Fixes: f5918a99283 ("microvm: add device tree support.")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/i386/microvm-dt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c
index 875ba919639..6ee6c42904d 100644
--- a/hw/i386/microvm-dt.c
+++ b/hw/i386/microvm-dt.c
@@ -327,7 +327,9 @@ void dt_setup_microvm(MicrovmMachineState *mms)
     dt_setup_sys_bus(mms);
 
     /* add to fw_cfg */
-    fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
+    if (debug) {
+        fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
+    }
     fw_cfg_add_file(x86ms->fw_cfg, "etc/fdt", mms->fdt, size);
 
     if (debug) {
-- 
2.31.1

Re: [PATCH-for-6.2] hw/i386/microvm: Reduce annoying debug message in dt_setup_microvm()
Posted by Darren Kenny 2 years, 5 months ago
On Wednesday, 2021-11-17 at 18:43:31 +01, Philippe Mathieu-Daudé wrote:
> Fixes: f5918a99283 ("microvm: add device tree support.")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>

> ---
>  hw/i386/microvm-dt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c
> index 875ba919639..6ee6c42904d 100644
> --- a/hw/i386/microvm-dt.c
> +++ b/hw/i386/microvm-dt.c
> @@ -327,7 +327,9 @@ void dt_setup_microvm(MicrovmMachineState *mms)
>      dt_setup_sys_bus(mms);
>  
>      /* add to fw_cfg */
> -    fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
> +    if (debug) {
> +        fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
> +    }
>      fw_cfg_add_file(x86ms->fw_cfg, "etc/fdt", mms->fdt, size);
>  
>      if (debug) {
> -- 
> 2.31.1

Re: [PATCH-for-6.2] hw/i386/microvm: Reduce annoying debug message in dt_setup_microvm()
Posted by Sergio Lopez 2 years, 5 months ago
On Wed, Nov 17, 2021 at 06:43:31PM +0100, Philippe Mathieu-Daudé wrote:
> Fixes: f5918a99283 ("microvm: add device tree support.")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/i386/microvm-dt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Sergio Lopez <slp@redhat.com>

> diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c
> index 875ba919639..6ee6c42904d 100644
> --- a/hw/i386/microvm-dt.c
> +++ b/hw/i386/microvm-dt.c
> @@ -327,7 +327,9 @@ void dt_setup_microvm(MicrovmMachineState *mms)
>      dt_setup_sys_bus(mms);
>  
>      /* add to fw_cfg */
> -    fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
> +    if (debug) {
> +        fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
> +    }
>      fw_cfg_add_file(x86ms->fw_cfg, "etc/fdt", mms->fdt, size);
>  
>      if (debug) {
> -- 
> 2.31.1
>