Re: [Qemu-devel] [PATCH v2 16/23] error: Strip trailing '\n' from error string arguments (again)

2015-12-18 Thread Markus Armbruster
Eric Blake  writes:

> On 12/17/2015 09:49 AM, Markus Armbruster wrote:
>> Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they
>> keep coming back.  Tracked down with the Coccinelle semantic patch
>> from commit 312fd5f.
>
> Don't forget to rerun this to pick up stragglers exposed by 1/23 :)

Just two:

qemu-nbd.c:574:76:"Shared device number must be greater than 0\n"
qemu-nbd.c:557:61:"socket path must be absolute\n"

>> Signed-off-by: Markus Armbruster 
>> Reviewed-by: Dr. David Alan Gilbert 
>> Acked-by: Cornelia Huck 
>> Acked-by: Bharata B Rao 
>> Acked-by: Fam Zheng 
>
> If you want to add to the list:
> Reviewed-by: Eric Blake 
>
>> +++ b/hw/s390x/s390-skeys.c
>> @@ -191,8 +191,8 @@ static int qemu_s390_skeys_set(S390SKeysState *ss, 
>> uint64_t start_gfn,
>>  /* Check for uint64 overflow and access beyond end of key data */
>>  if (start_gfn + count > skeydev->key_count || start_gfn + count < 
>> count) {
>>  error_report("Error: Setting storage keys for page beyond the end "
>> -"of memory: gfn=%" PRIx64 " count=%" PRId64 "\n", start_gfn,
>> -count);
>> + "of memory: gfn=%" PRIx64 " count=%" PRId64,
>> + start_gfn, count);
>
> Do we want a separate patch cleaning up 'Error: ' prefixes?

After my Christmas break, in a separate series probably.



[Qemu-devel] [PATCH v2 16/23] error: Strip trailing '\n' from error string arguments (again)

2015-12-17 Thread Markus Armbruster
Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they
keep coming back.  Tracked down with the Coccinelle semantic patch
from commit 312fd5f.

Cc: Fam Zheng 
Cc: Peter Crosthwaite 
Cc: Bharata B Rao 
Cc: Dominik Dingel 
Cc: David Hildenbrand 
Cc: Jason J. Herne 
Cc: Stefan Berger 
Cc: Dr. David Alan Gilbert 
Cc: Changchun Ouyang 
Cc: zhanghailiang 
Cc: Pavel Fedin 
Signed-off-by: Markus Armbruster 
Reviewed-by: Dr. David Alan Gilbert 
Acked-by: Cornelia Huck 
Acked-by: Bharata B Rao 
Acked-by: Fam Zheng 
---
 block/vmdk.c  |  4 ++--
 hw/arm/xlnx-zynqmp.c  |  2 +-
 hw/ppc/spapr.c|  3 ++-
 hw/s390x/ipl.c|  8 
 hw/s390x/s390-skeys-kvm.c |  2 +-
 hw/s390x/s390-skeys.c | 16 
 hw/tpm/tpm_tis.c  |  2 +-
 migration/ram.c   |  2 +-
 migration/savevm.c|  4 ++--
 net/vhost-user.c  |  6 +++---
 qga/commands-posix.c  |  2 +-
 target-arm/cpu.c  |  2 +-
 target-arm/machine.c  |  4 ++--
 13 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index 6f819e4..b4a224e 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1494,8 +1494,8 @@ static int vmdk_write(BlockDriverState *bs, int64_t 
sector_num,
 
 if (sector_num > bs->total_sectors) {
 error_report("Wrong offset: sector_num=0x%" PRIx64
-" total_sectors=0x%" PRIx64 "\n",
-sector_num, bs->total_sectors);
+ " total_sectors=0x%" PRIx64,
+ sector_num, bs->total_sectors);
 return -EIO;
 }
 
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 87553bb..20a3b2b 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -227,7 +227,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error 
**errp)
 }
 
 if (!s->boot_cpu_ptr) {
-error_setg(errp, "ZynqMP Boot cpu %s not found\n", boot_cpu);
+error_setg(errp, "ZynqMP Boot cpu %s not found", boot_cpu);
 return;
 }
 
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 440b56e..3bfb957 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1833,7 +1833,8 @@ static void ppc_spapr_init(MachineState *machine)
 ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size;
 
 if (machine->ram_slots > SPAPR_MAX_RAM_SLOTS) {
-error_report("Specified number of memory slots %"PRIu64" exceeds 
max supported %d\n",
+error_report("Specified number of memory slots %" PRIu64
+ " exceeds max supported %d",
  machine->ram_slots, SPAPR_MAX_RAM_SLOTS);
 exit(EXIT_FAILURE);
 }
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index b91fcc6..e100428 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -94,7 +94,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
 
 bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
 if (bios_filename == NULL) {
-error_setg(_err, "could not find stage1 bootloader\n");
+error_setg(_err, "could not find stage1 bootloader");
 goto error;
 }
 
@@ -113,7 +113,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
 g_free(bios_filename);
 
 if (bios_size == -1) {
-error_setg(_err, "could not load bootloader '%s'\n", bios_name);
+error_setg(_err, "could not load bootloader '%s'", bios_name);
 goto error;
 }
 
@@ -128,7 +128,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
 kernel_size = load_image_targphys(ipl->kernel, 0, ram_size);
 }
 if (kernel_size < 0) {
-error_setg(_err, "could not load kernel '%s'\n", ipl->kernel);
+error_setg(_err, "could not load kernel '%s'", ipl->kernel);
 goto error;
 }
 /*
@@ -156,7 +156,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
 initrd_size = load_image_targphys(ipl->initrd, initrd_offset,
   ram_size - initrd_offset);
 if (initrd_size == -1) {
-error_setg(_err, "could not load initrd '%s'\n", 
ipl->initrd);
+error_setg(_err, "could not load initrd '%s'", ipl->initrd);
 goto error;
 }
 
diff --git a/hw/s390x/s390-skeys-kvm.c b/hw/s390x/s390-skeys-kvm.c
index 682949a..eaa37ba 100644
--- a/hw/s390x/s390-skeys-kvm.c
+++ b/hw/s390x/s390-skeys-kvm.c
@@ -21,7 +21,7 @@ static int 

Re: [Qemu-devel] [PATCH v2 16/23] error: Strip trailing '\n' from error string arguments (again)

2015-12-17 Thread Eric Blake
On 12/17/2015 09:49 AM, Markus Armbruster wrote:
> Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they
> keep coming back.  Tracked down with the Coccinelle semantic patch
> from commit 312fd5f.

Don't forget to rerun this to pick up stragglers exposed by 1/23 :)

> Signed-off-by: Markus Armbruster 
> Reviewed-by: Dr. David Alan Gilbert 
> Acked-by: Cornelia Huck 
> Acked-by: Bharata B Rao 
> Acked-by: Fam Zheng 

If you want to add to the list:
Reviewed-by: Eric Blake 

> +++ b/hw/s390x/s390-skeys.c
> @@ -191,8 +191,8 @@ static int qemu_s390_skeys_set(S390SKeysState *ss, 
> uint64_t start_gfn,
>  /* Check for uint64 overflow and access beyond end of key data */
>  if (start_gfn + count > skeydev->key_count || start_gfn + count < count) 
> {
>  error_report("Error: Setting storage keys for page beyond the end "
> -"of memory: gfn=%" PRIx64 " count=%" PRId64 "\n", start_gfn,
> -count);
> + "of memory: gfn=%" PRIx64 " count=%" PRId64,
> + start_gfn, count);

Do we want a separate patch cleaning up 'Error: ' prefixes?

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature