qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Anton Johansson <anjo@rev.ng>,
	Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [RFC PATCH v2 01/11] qapi: Rename TargetInfo structure as BinaryTargetInfo
Date: Thu, 17 Apr 2025 19:55:11 -0700	[thread overview]
Message-ID: <94f61b71-495b-447e-830d-897d83e334a8@linaro.org> (raw)
In-Reply-To: <20250418005059.4436-2-philmd@linaro.org>

On 4/17/25 17:50, Philippe Mathieu-Daudé wrote:
> The QAPI-generated 'TargetInfo' structure name is only used
> in a single file. We want to heavily use another structure
> similarly named. Rename the QAPI one, since structure names
> are not part of the public API.
> 
> Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   qapi/machine.json          | 12 ++++++------
>   hw/core/machine-qmp-cmds.c |  4 ++--
>   2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/qapi/machine.json b/qapi/machine.json
> index a6b8795b09e..3246212f048 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -275,15 +275,15 @@
>   { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
>   
>   ##
> -# @TargetInfo:
> +# @BinaryTargetInfo:
>   #
> -# Information describing the QEMU target.
> +# Information describing the QEMU binary target.
>   #
> -# @arch: the target architecture
> +# @arch: the binary target architecture
>   #
>   # Since: 1.2
>   ##
> -{ 'struct': 'TargetInfo',
> +{ 'struct': 'BinaryTargetInfo',
>     'data': { 'arch': 'SysEmuTarget' } }
>   
>   ##
> @@ -291,11 +291,11 @@
>   #
>   # Return information about the target for this QEMU
>   #
> -# Returns: TargetInfo
> +# Returns: BinaryTargetInfo
>   #
>   # Since: 1.2
>   ##
> -{ 'command': 'query-target', 'returns': 'TargetInfo' }
> +{ 'command': 'query-target', 'returns': 'BinaryTargetInfo' }
>   
>   ##
>   # @UuidInfo:
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 3130c5cd456..408994b67d7 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -132,9 +132,9 @@ CurrentMachineParams *qmp_query_current_machine(Error **errp)
>       return params;
>   }
>   
> -TargetInfo *qmp_query_target(Error **errp)
> +BinaryTargetInfo *qmp_query_target(Error **errp)
>   {
> -    TargetInfo *info = g_malloc0(sizeof(*info));
> +    BinaryTargetInfo *info = g_malloc0(sizeof(*info));
>   
>       info->arch = qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1,
>                                    &error_abort);

Good for me. If anyone wants another name than BinaryTargetInfo, I'm ok 
with it.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


  reply	other threads:[~2025-04-18  2:55 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18  0:50 [RFC PATCH v2 00/11] single-binary: Make hw/arm/ common Philippe Mathieu-Daudé
2025-04-18  0:50 ` [RFC PATCH v2 01/11] qapi: Rename TargetInfo structure as BinaryTargetInfo Philippe Mathieu-Daudé
2025-04-18  2:55   ` Pierrick Bouvier [this message]
2025-04-18  0:50 ` [RFC PATCH v2 02/11] qemu: Convert target_name() to TargetInfo API Philippe Mathieu-Daudé
2025-04-18  3:01   ` Pierrick Bouvier
2025-04-18 14:02     ` Philippe Mathieu-Daudé
2025-04-18 16:23       ` Pierrick Bouvier
2025-04-18 17:15         ` Philippe Mathieu-Daudé
2025-04-18  0:50 ` [RFC PATCH v2 03/11] system/vl: Filter machine list available for a particular target binary Philippe Mathieu-Daudé
2025-04-18  3:06   ` Pierrick Bouvier
2025-04-18 14:14     ` Philippe Mathieu-Daudé
2025-04-18  0:50 ` [RFC PATCH v2 04/11] hw/arm: Register TYPE_TARGET_ARM/AARCH64_CPU QOM interfaces Philippe Mathieu-Daudé
2025-04-18  3:07   ` Pierrick Bouvier
2025-04-18 14:07     ` Philippe Mathieu-Daudé
2025-04-18 16:30       ` Pierrick Bouvier
2025-04-18 17:04         ` Philippe Mathieu-Daudé
2025-04-18 17:07           ` Pierrick Bouvier
2025-04-18 17:10             ` Philippe Mathieu-Daudé
2025-04-18 17:23               ` Pierrick Bouvier
2025-04-18 17:32                 ` Philippe Mathieu-Daudé
2025-04-19  1:17                   ` Pierrick Bouvier
2025-04-18  0:50 ` [RFC PATCH v2 05/11] hw/arm: Filter machine types for qemu-system-aarch64 binary Philippe Mathieu-Daudé
2025-04-18  0:50 ` [RFC PATCH v2 06/11] hw/arm: Filter machine types for qemu-system-arm binary Philippe Mathieu-Daudé
2025-04-18  3:08   ` Pierrick Bouvier
2025-04-18  0:50 ` [RFC PATCH v2 07/11] hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine Philippe Mathieu-Daudé
2025-04-18  3:32   ` Pierrick Bouvier
2025-04-18  0:50 ` [RFC PATCH v2 08/11] config/target: Implement per-binary TargetInfo structure (ARM) Philippe Mathieu-Daudé
2025-04-18  3:39   ` Pierrick Bouvier
2025-04-18  4:02   ` Pierrick Bouvier
2025-04-18 11:20     ` Philippe Mathieu-Daudé
2025-04-18  0:50 ` [RFC PATCH v2 09/11] config/target: Implement per-binary TargetInfo structure (Aarch64) Philippe Mathieu-Daudé
2025-04-18  3:34   ` Pierrick Bouvier
2025-04-18  0:50 ` [RFC PATCH v2 10/11] hw/arm/aspeed: Build objects once Philippe Mathieu-Daudé
2025-04-18  4:02   ` Pierrick Bouvier
2025-04-18  0:50 ` [RFC PATCH v2 11/11] hw/arm/raspi: " Philippe Mathieu-Daudé
2025-04-18  4:03   ` Pierrick Bouvier

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=94f61b71-495b-447e-830d-897d83e334a8@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=anjo@rev.ng \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).