qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Juraj Marcin" <jmarcin@redhat.com>,
	"Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Subject: Re: [PATCH for-11.0 v2 2/7] Revert "error: define g_autoptr() cleanup function for the Error type"
Date: Tue, 2 Dec 2025 08:53:22 +0100	[thread overview]
Message-ID: <09a4f4a7-c22e-4da7-ae00-d27f7d566d9b@redhat.com> (raw)
In-Reply-To: <20251201194510.1121221-3-peterx@redhat.com>

On 12/1/25 20:45, Peter Xu wrote:
> This reverts commit 18eb55546a54e443d94a4c49286348176ad4b00a.
> 
> Due to the nature of how Error should be used (normally ownership will be
> passed over to Error APIs, like error_report_err), auto-free functions may
> be error prone on its own.  The auto cleanup function was merged without
> proper review as pointed out by Dan and Markus:
> 
> https://lore.kernel.org/r/aSWSLMi6ZhTCS_p2@redhat.com
> 
> Cc: Cédric Le Goater <clg@redhat.com>
> Acked-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>   include/qapi/error.h | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/include/qapi/error.h b/include/qapi/error.h
> index b16c6303f8..f3ce4a4a2d 100644
> --- a/include/qapi/error.h
> +++ b/include/qapi/error.h
> @@ -437,8 +437,6 @@ Error *error_copy(const Error *err);
>    */
>   void error_free(Error *err);
>   
> -G_DEFINE_AUTOPTR_CLEANUP_FUNC(Error, error_free)
> -
>   /*
>    * Convenience function to assert that *@errp is set, then silently free it.
>    */


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.




  reply	other threads:[~2025-12-02  7:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01 19:45 [PATCH for-11.0 v2 0/7] migration: Error reporting cleanups Peter Xu
2025-12-01 19:45 ` [PATCH for-11.0 v2 1/7] migration: Use explicit error_free() instead of g_autoptr Peter Xu
2025-12-01 19:45 ` [PATCH for-11.0 v2 2/7] Revert "error: define g_autoptr() cleanup function for the Error type" Peter Xu
2025-12-02  7:53   ` Cédric Le Goater [this message]
2025-12-01 19:45 ` [PATCH for-11.0 v2 3/7] error: Poison g_autoptr(Error) to prevent its use Peter Xu
2025-12-01 19:45 ` [PATCH for-11.0 v2 4/7] migration: Make migration_connect_set_error() own the error Peter Xu
2025-12-02 11:42   ` Markus Armbruster
2025-12-01 19:45 ` [PATCH for-11.0 v2 5/7] migration: Make multifd_send_set_error() " Peter Xu
2025-12-01 19:45 ` [PATCH for-11.0 v2 6/7] migration: Make multifd_recv_terminate_threads() " Peter Xu
2025-12-02 11:44   ` Markus Armbruster
2025-12-01 19:45 ` [PATCH for-11.0 v2 7/7] migration: Replace migrate_set_error() with migrate_error_propagate() Peter Xu
2025-12-02 11:59   ` Markus Armbruster
2025-12-02 17:28     ` Peter Xu
2025-12-02 13:55 ` [PATCH for-11.0 v2 0/7] migration: Error reporting cleanups Fabiano Rosas
2025-12-02 17:47   ` Peter Xu
2025-12-02 17:53 ` [PATCH for-11.0 v2 8/7] migration: Use error_propagate() in migrate_error_propagate() Peter Xu
2025-12-03  7:38   ` Markus Armbruster
2025-12-03 14:33 ` [PATCH for-11.0 v2 0/7] migration: Error reporting cleanups Peter Xu

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=09a4f4a7-c22e-4da7-ae00-d27f7d566d9b@redhat.com \
    --to=clg@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=jmarcin@redhat.com \
    --cc=mail@maciej.szmigiero.name \
    --cc=marcandre.lureau@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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).