[Qemu-devel] [PATCH v4 6/8] target/mips: Convert VM clock update prints to warn_report

Alistair Francis posted 8 patches 8 years, 5 months ago
[Qemu-devel] [PATCH v4 6/8] target/mips: Convert VM clock update prints to warn_report
Posted by Alistair Francis 8 years, 5 months ago
Convert the fprintf() messages in kvm_mips_update_state() to use
warn_report() as they aren't errors, but are just warnings.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Cc: James Hogan <james.hogan@imgtec.com>
---

 target/mips/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index a23aa438d2..3b7b1d962a 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -526,7 +526,7 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
         if (!cs->vcpu_dirty) {
             ret = kvm_mips_save_count(cs);
             if (ret < 0) {
-                fprintf(stderr, "Failed saving count\n");
+                warn_report("Failed saving count");
             }
         }
     } else {
@@ -535,14 +535,14 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
         ret = kvm_mips_put_one_ureg64(cs, KVM_REG_MIPS_COUNT_RESUME,
                                       &count_resume);
         if (ret < 0) {
-            fprintf(stderr, "Failed setting COUNT_RESUME\n");
+            warn_report("Failed setting COUNT_RESUME");
             return;
         }
 
         if (!cs->vcpu_dirty) {
             ret = kvm_mips_restore_count(cs);
             if (ret < 0) {
-                fprintf(stderr, "Failed restoring count\n");
+                warn_report("Failed restoring count");
             }
         }
     }
-- 
2.11.0


Re: [Qemu-devel] [PATCH v4 6/8] target/mips: Convert VM clock update prints to warn_report
Posted by Philippe Mathieu-Daudé 8 years, 5 months ago
(Cc'ing Yongbok and Aurelien from get_maintainer.pl)

On 09/11/2017 04:52 PM, Alistair Francis wrote:
> Convert the fprintf() messages in kvm_mips_update_state() to use
> warn_report() as they aren't errors, but are just warnings.
> 
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Cc: James Hogan <james.hogan@imgtec.com>
> ---
> 
>   target/mips/kvm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/mips/kvm.c b/target/mips/kvm.c
> index a23aa438d2..3b7b1d962a 100644
> --- a/target/mips/kvm.c
> +++ b/target/mips/kvm.c
> @@ -526,7 +526,7 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
>           if (!cs->vcpu_dirty) {
>               ret = kvm_mips_save_count(cs);
>               if (ret < 0) {
> -                fprintf(stderr, "Failed saving count\n");
> +                warn_report("Failed saving count");
>               }
>           }
>       } else {
> @@ -535,14 +535,14 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
>           ret = kvm_mips_put_one_ureg64(cs, KVM_REG_MIPS_COUNT_RESUME,
>                                         &count_resume);
>           if (ret < 0) {
> -            fprintf(stderr, "Failed setting COUNT_RESUME\n");
> +            warn_report("Failed setting COUNT_RESUME");
>               return;
>           }
>   
>           if (!cs->vcpu_dirty) {
>               ret = kvm_mips_restore_count(cs);
>               if (ret < 0) {
> -                fprintf(stderr, "Failed restoring count\n");
> +                warn_report("Failed restoring count");
>               }
>           }
>       }
> 

Re: [Qemu-devel] [PATCH v4 6/8] target/mips: Convert VM clock update prints to warn_report
Posted by James Hogan 8 years, 5 months ago
On Mon, Sep 11, 2017 at 12:52:59PM -0700, Alistair Francis wrote:
> Convert the fprintf() messages in kvm_mips_update_state() to use
> warn_report() as they aren't errors, but are just warnings.
> 
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Cc: James Hogan <james.hogan@imgtec.com>

Acked-by: James Hogan <james.hogan@imgtec.com>

Thanks
James

> ---
> 
>  target/mips/kvm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/mips/kvm.c b/target/mips/kvm.c
> index a23aa438d2..3b7b1d962a 100644
> --- a/target/mips/kvm.c
> +++ b/target/mips/kvm.c
> @@ -526,7 +526,7 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
>          if (!cs->vcpu_dirty) {
>              ret = kvm_mips_save_count(cs);
>              if (ret < 0) {
> -                fprintf(stderr, "Failed saving count\n");
> +                warn_report("Failed saving count");
>              }
>          }
>      } else {
> @@ -535,14 +535,14 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
>          ret = kvm_mips_put_one_ureg64(cs, KVM_REG_MIPS_COUNT_RESUME,
>                                        &count_resume);
>          if (ret < 0) {
> -            fprintf(stderr, "Failed setting COUNT_RESUME\n");
> +            warn_report("Failed setting COUNT_RESUME");
>              return;
>          }
>  
>          if (!cs->vcpu_dirty) {
>              ret = kvm_mips_restore_count(cs);
>              if (ret < 0) {
> -                fprintf(stderr, "Failed restoring count\n");
> +                warn_report("Failed restoring count");
>              }
>          }
>      }
> -- 
> 2.11.0
>