From: Richard Henderson <richard.henderson@linaro.org>
To: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, qemu-devel@nongnu.org
Subject: Re: [PATCH 02/35] hw/core/loader: Use address_space_get_path()
Date: Wed, 17 Sep 2025 08:55:33 -0700 [thread overview]
Message-ID: <546a6886-6812-4abe-affd-70ff59f85a04@linaro.org> (raw)
In-Reply-To: <73f3ad14-e9cd-4477-afdb-76fb65f5617e@linaro.org>
On 9/17/25 08:18, Richard Henderson wrote:
> On 9/17/25 05:56, Akihiko Odaki wrote:
>> The name field of an QOM-ified AddressSpace represents a property name,
>> which may not be sufficient to identify the AddressSpace. Use
>> address_space_get_path() instead.
>>
>> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
>> ---
>> hw/core/loader.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/core/loader.c b/hw/core/loader.c
>> index 524af6f14a09..1ee603f19c90 100644
>> --- a/hw/core/loader.c
>> +++ b/hw/core/loader.c
>> @@ -1258,10 +1258,10 @@ static bool roms_overlap(Rom *last_rom, Rom *this_rom)
>> last_rom->addr + last_rom->romsize > this_rom->addr;
>> }
>> -static const char *rom_as_name(Rom *rom)
>> +static const char *rom_as_path(Rom *rom)
>> {
>> - const char *name = rom->as ? rom->as->name : NULL;
>> - return name ?: "anonymous";
>> + const char *path = rom->as ? address_space_get_path(rom->as) : NULL;
>> + return path ?: "anonymous";
>> }
>
> You're not freeing the result of address_space_get_path.
In addition, I think the result of address_space_get_path cannot be null, so,
if (rom->as) {
return address_space_get_path(rom->as);
}
return g_strdup("anonymous");
r~
next prev parent reply other threads:[~2025-09-17 15:55 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 12:56 [PATCH 00/35] memory: QOM-ify AddressSpace Akihiko Odaki
2025-09-17 12:56 ` [PATCH 01/35] " Akihiko Odaki
2025-09-17 15:53 ` Richard Henderson
2025-09-17 12:56 ` [PATCH 02/35] hw/core/loader: Use address_space_get_path() Akihiko Odaki
2025-09-17 15:18 ` Richard Henderson
2025-09-17 15:55 ` Richard Henderson [this message]
2025-09-17 12:56 ` [PATCH 03/35] vfio: " Akihiko Odaki
2025-09-18 9:52 ` Cédric Le Goater
2025-09-17 12:56 ` [PATCH 04/35] hw/alpha: QOM-ify AddressSpace Akihiko Odaki
2025-09-17 15:56 ` Richard Henderson
2025-09-17 12:56 ` [PATCH 05/35] hw/arm: " Akihiko Odaki
2025-09-17 15:57 ` Richard Henderson
2025-09-17 12:56 ` [PATCH 06/35] hw/display: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 07/35] hw/dma: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 08/35] hw/fsi: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 09/35] hw/i2c: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 10/35] hw/i386: " Akihiko Odaki
2025-09-18 5:53 ` CLEMENT MATHIEU--DRIF
2025-09-18 12:16 ` Akihiko Odaki
2025-09-17 12:56 ` [PATCH 11/35] hw/intc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 12/35] hw/loongarch: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 13/35] hw/mem: " Akihiko Odaki
2025-09-17 13:24 ` Jonathan Cameron via
2025-09-17 12:56 ` [PATCH 14/35] hw/misc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 15/35] hw/net: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 16/35] hw/nubus: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 17/35] hw/pci: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 18/35] hw/pci-host: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 19/35] hw/ppc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 20/35] hw/remote: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 21/35] hw/riscv: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 22/35] hw/s390x: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 23/35] hw/scsi: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 24/35] hw/sd: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 25/35] hw/sparc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 26/35] hw/sparc64: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 27/35] hw/ssi: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 28/35] hw/usb: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 29/35] " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 30/35] hw/virtio: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 31/35] system/physmem: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 32/35] target/i386: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 33/35] target/mips: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 34/35] target/xtensa: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 35/35] memory: Drop non-QOM AddressSpace support Akihiko Odaki
2025-09-17 16:01 ` Richard Henderson
2025-09-18 12:39 ` [PATCH 00/35] memory: QOM-ify AddressSpace Cédric Le Goater
2025-09-18 12:47 ` Akihiko Odaki
2025-09-29 20:58 ` Peter Xu
2025-09-30 8:06 ` Cédric Le Goater
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=546a6886-6812-4abe-affd-70ff59f85a04@linaro.org \
--to=richard.henderson@linaro.org \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--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).