qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alistair Francis <alistair.francis@xilinx.com>
Subject: [Qemu-devel] [PULL 37/50] General warn report fixups
Date: Tue, 19 Sep 2017 14:29:26 +0200	[thread overview]
Message-ID: <1505824179-21541-38-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1505824179-21541-1-git-send-email-pbonzini@redhat.com>

From: Alistair Francis <alistair.francis@xilinx.com>

Tidy up some of the warn_report() messages after having converted them
to use warn_report().

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <9cb1d23551898c9c9a5f84da6773e99871285120.1505158760.git.alistair.francis@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/vvfat.c               |  3 +--
 hw/arm/vexpress.c           |  2 +-
 hw/i386/xen/xen-mapcache.c  |  2 +-
 hw/mips/mips_malta.c        |  4 ++--
 hw/mips/mips_r4k.c          |  3 +--
 hw/s390x/s390-virtio.c      | 14 ++++++++------
 net/hub.c                   |  6 ++----
 net/net.c                   |  5 +++--
 target/i386/hax-mem.c       |  6 +++---
 target/ppc/translate_init.c |  3 +--
 ui/keymaps.c                |  3 +--
 11 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/block/vvfat.c b/block/vvfat.c
index 6659a4a..cbabb36 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1227,8 +1227,7 @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags,
 
     switch (s->fat_type) {
     case 32:
-        warn_report("FAT32 has not been tested. "
-                    "You are welcome to do so!");
+        warn_report("FAT32 has not been tested. You are welcome to do so!");
         break;
     case 16:
     case 12:
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index f72ee66..96c5eeb 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -494,7 +494,7 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt)
          * happen with older device tree blobs.
          */
         warn_report("couldn't find interrupt controller in "
-                    "dtb; will not include virtio-mmio devices in the dtb.");
+                    "dtb; will not include virtio-mmio devices in the dtb");
     } else {
         int i;
         const hwaddr *map = daughterboard->motherboard_map;
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c
index 91a4fd6..baab93b 100644
--- a/hw/i386/xen/xen-mapcache.c
+++ b/hw/i386/xen/xen-mapcache.c
@@ -127,7 +127,7 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque)
 
         if (rlimit_as.rlim_max != RLIM_INFINITY) {
             warn_report("QEMU's maximum size of virtual"
-                        " memory is not infinity.");
+                        " memory is not infinity");
         }
         if (rlimit_as.rlim_max < MCACHE_MAX_SIZE + NON_MCACHE_MEMORY_SIZE) {
             mapcache->max_mcache_size = rlimit_as.rlim_max -
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 233e2ee..7d6e583 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -216,8 +216,8 @@ static void generate_eeprom_spd(uint8_t *eeprom, ram_addr_t ram_size)
     }
 
     if (ram_size) {
-        warn_report("SPD cannot represent final %dMB"
-                    " of SDRAM", (int)ram_size);
+        warn_report("SPD cannot represent final " RAM_ADDR_FMT "MB"
+                    " of SDRAM", ram_size);
     }
 
     /* fill in SPD memory information */
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index 6ffb88f..b48a4d7 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -254,8 +254,7 @@ void mips_r4k_init(MachineState *machine)
 	}
     } else if (!qtest_enabled()) {
         /* not fatal */
-        warn_report("could not load MIPS bios '%s'",
-                    bios_name);
+        warn_report("could not load MIPS bios '%s'", bios_name);
     }
     g_free(filename);
 
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 25781f0..0e91c46 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -141,9 +141,10 @@ void gtod_save(QEMUFile *f, void *opaque)
 
     r = s390_get_clock(&tod_high, &tod_low);
     if (r) {
-        warn_report("Unable to get guest clock for migration. "
-                    "Error code %d. Guest clock will not be migrated "
-                    "which could cause the guest to hang.", r);
+        warn_report("Unable to get guest clock for migration: %s",
+                    strerror(-r));
+        error_printf("Guest clock will not be migrated "
+                     "which could cause the guest to hang.");
         qemu_put_byte(f, S390_TOD_CLOCK_VALUE_MISSING);
         return;
     }
@@ -170,9 +171,10 @@ int gtod_load(QEMUFile *f, void *opaque, int version_id)
 
     r = s390_set_clock(&tod_high, &tod_low);
     if (r) {
-        warn_report("Unable to set guest clock value. "
-                    "s390_get_clock returned error %d. This could cause "
-                    "the guest to hang.", r);
+        warn_report("Unable to set guest clock for migration: %s",
+                    strerror(-r));
+        error_printf("Guest clock will not be restored "
+                     "which could cause the guest to hang.");
     }
 
     return 0;
diff --git a/net/hub.c b/net/hub.c
index 745a216..14b4eec 100644
--- a/net/hub.c
+++ b/net/hub.c
@@ -310,8 +310,7 @@ void net_hub_check_clients(void)
         QLIST_FOREACH(port, &hub->ports, next) {
             peer = port->nc.peer;
             if (!peer) {
-                warn_report("hub port %s has no peer",
-                            port->nc.name);
+                warn_report("hub port %s has no peer", port->nc.name);
                 continue;
             }
 
@@ -334,8 +333,7 @@ void net_hub_check_clients(void)
             warn_report("vlan %d with no nics", hub->id);
         }
         if (has_nic && !has_host_dev) {
-            warn_report("vlan %d is not connected to host network",
-                        hub->id);
+            warn_report("vlan %d is not connected to host network", hub->id);
         }
     }
 }
diff --git a/net/net.c b/net/net.c
index 1301cdb..39ef546 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1494,8 +1494,9 @@ void net_check_clients(void)
     QTAILQ_FOREACH(nc, &net_clients, next) {
         if (!nc->peer) {
             warn_report("%s %s has no peer",
-                        nc->info->type == NET_CLIENT_DRIVER_NIC ?
-                        "nic" : "netdev", nc->name);
+                        nc->info->type == NET_CLIENT_DRIVER_NIC
+                        ? "nic" : "netdev",
+                        nc->name);
         }
     }
 
diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c
index 756f2dd..27a0d21 100644
--- a/target/i386/hax-mem.c
+++ b/target/i386/hax-mem.c
@@ -12,6 +12,7 @@
 #include "cpu.h"
 #include "exec/address-spaces.h"
 #include "exec/exec-all.h"
+#include "qemu/error-report.h"
 
 #include "target/i386/hax-i386.h"
 #include "qemu/queue.h"
@@ -178,9 +179,8 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags)
     if (!memory_region_is_ram(mr)) {
         if (memory_region_is_romd(mr)) {
             /* HAXM kernel module does not support ROMD yet  */
-            warn_report("Ignoring ROMD region 0x%016" PRIx64
-                        "->0x%016" PRIx64 "", __func__, start_pa,
-                        start_pa + size);
+            warn_report("Ignoring ROMD region 0x%016" PRIx64 "->0x%016" PRIx64,
+                        start_pa, start_pa + size);
         }
         return;
     }
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
index 49190ec..466bf97 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -9321,8 +9321,7 @@ static void init_ppc_proc(PowerPCCPU *cpu)
     }
 #endif
     if (env->check_pow == NULL) {
-        warn_report("no power management check handler "
-                    "registered."
+        warn_report("no power management check handler registered."
                     " Attempt QEMU to crash very soon !");
     }
 }
diff --git a/ui/keymaps.c b/ui/keymaps.c
index a6cefda..f9762d1 100644
--- a/ui/keymaps.c
+++ b/ui/keymaps.c
@@ -198,8 +198,7 @@ int keysym2scancode(void *kbd_layout, int keysym)
     if (keysym < MAX_NORMAL_KEYCODE) {
         if (k->keysym2keycode[keysym] == 0) {
             trace_keymap_unmapped(keysym);
-            warn_report("no scancode found for keysym %d",
-                        keysym);
+            warn_report("no scancode found for keysym %d", keysym);
         }
         return k->keysym2keycode[keysym];
     } else {
-- 
1.8.3.1

  parent reply	other threads:[~2017-09-19 12:30 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 12:28 [Qemu-devel] [PULL 00/50] Misc patches for 2017-09-19 Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 01/50] target/i386: fix pmovsx/pmovzx in-place operations Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 02/50] target/i386: set rip_offset for further SSE instructions Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 03/50] target/i386: fix packusdw in-place operation Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 04/50] target/i386: fix pcmpxstrx substring search Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 05/50] target/i386: fix phminposuw in-place operation Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 06/50] virtio-scsi: Add virtqueue_size parameter allowing virtqueue size to be set Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 07/50] scsi-bus: correct responses for INQUIRY and REQUEST SENSE Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 08/50] scsi: Refactor scsi sense interpreting code Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 09/50] scsi: Improve scsi_sense_to_errno Paolo Bonzini
2017-09-19 12:28 ` [Qemu-devel] [PULL 10/50] scsi: Introduce scsi_sense_buf_to_errno Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 11/50] scsi-block: Support rerror/werror Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 12/50] scsi: rename scsi_build_sense to scsi_convert_sense Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 13/50] scsi: move non-emulation specific code to scsi/ Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 14/50] scsi: introduce scsi_build_sense Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 15/50] scsi: introduce sg_io_sense_from_errno Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 16/50] scsi: move block/scsi.h to include/scsi/constants.h Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 17/50] MAINTAINERS: update mail address for NVDIMM Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 18/50] i386/kvm: use a switch statement for MSR detection Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 19/50] i386/kvm: set tsc_khz before configuring Hyper-V CPUID Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 20/50] i386/kvm: introduce tsc_is_stable_and_known() Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 21/50] i386/kvm: advertise Hyper-V frequency MSRs Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 22/50] MAINTAINERS: update email, add missing test entry for megasas Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 23/50] memory: Rename queue to mrqueue (memory region queue) Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 24/50] scsi/esp: Rename the ESP macro to ESP_STATE Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 25/50] multiboot: validate multiboot header address values Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 26/50] kvm: require JOIN_MEMORY_REGIONS_WORKS Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 27/50] kvm: factor out alignment of memory section Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 28/50] kvm: use start + size for memory ranges Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 29/50] kvm: we never have overlapping slots in kvm_set_phys_mem() Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 30/50] kvm: kvm_log_start/stop are only called with known sections Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 31/50] kvm: kvm_log_sync() is only called with known memory sections Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 32/50] test-qga: add missing qemu-ga tool dependency Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 33/50] hw/i386: Improve some of the warning messages Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 34/50] Convert remaining error_report() to warn_report() Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 35/50] Convert single line fprintf(.../n) " Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 36/50] Convert multi-line fprintf() " Paolo Bonzini
2017-09-19 12:29 ` Paolo Bonzini [this message]
2017-09-19 12:29 ` [Qemu-devel] [PULL 38/50] target/mips: Convert VM clock update prints to warn_report Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 39/50] Makefile: Remove libqemustub.a Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 40/50] Convert remaining single line fprintf() to warn_report() Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 41/50] i386/cpu/hyperv: support over 64 vcpus for windows guests Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 42/50] hyperv: add header with protocol definitions Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 43/50] update-linux-headers: prepare for hyperv.h removal Paolo Bonzini
2017-09-19 12:36   ` Roman Kagan
2017-09-19 12:45     ` Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 44/50] scripts: let checkpatch.pl process an entire GIT branch Paolo Bonzini
2017-10-03 22:07   ` Alex Williamson
2017-10-04  8:33     ` Daniel P. Berrange
2017-10-04 13:17       ` Alex Williamson
2017-10-04 14:11         ` Paolo Bonzini
2017-10-04 14:20           ` Daniel P. Berrange
2017-10-04 16:16           ` Alex Williamson
2017-09-19 12:29 ` [Qemu-devel] [PULL 45/50] target/i386: fix "info mem" for LA57 mode Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 46/50] accel/hax: move hax-stub.c to accel/stubs/ Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 47/50] checkpatch: add hwaddr to @typeList Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 48/50] osdep.h: Prohibit disabling assert() in supported builds Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 49/50] default-configs: Replace $(and ...) with $(call land, ...) Paolo Bonzini
2017-09-19 12:29 ` [Qemu-devel] [PULL 50/50] docker: fix creation of archives Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505824179-21541-38-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).