From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8MRo-0001nG-9v for qemu-devel@nongnu.org; Fri, 05 Oct 2018 05:31:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8MIP-00065t-LE for qemu-devel@nongnu.org; Fri, 05 Oct 2018 05:21:19 -0400 From: David Hildenbrand Date: Fri, 5 Oct 2018 11:20:11 +0200 Message-Id: <20181005092024.14344-4-david@redhat.com> In-Reply-To: <20181005092024.14344-1-david@redhat.com> References: <20181005092024.14344-1-david@redhat.com> Subject: [Qemu-devel] [PATCH v5 03/16] memory-device: improve "range conflicts" error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, "Dr . David Alan Gilbert" , "Michael S . Tsirkin" , Igor Mammedov , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Eric Blake , Markus Armbruster , Pankaj Gupta , Luiz Capitulino , Xiao Guangrong , David Gibson , Alexander Graf , Auger Eric , David Hildenbrand Handle id==NULL better and indicate that we are dealing with memory devices. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index 7c706fadfc..0624184c40 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -175,7 +175,8 @@ uint64_t memory_device_get_free_addr(MachineState *ms, const uint64_t *hint, if (ranges_overlap(md_addr, md_size, new_addr, size)) { if (hint) { const DeviceState *d = DEVICE(md); - error_setg(errp, "address range conflicts with '%s'", d->id); + error_setg(errp, "address range conflicts with memory device" + " id='%s'", d->id ? d->id : "(unnamed)"); goto out; } new_addr = QEMU_ALIGN_UP(md_addr + md_size, align); -- 2.17.1