All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
	Jens Freimann <jfreimann@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org,
	Hailiang Zhang <zhang.zhanghailiang@huawei.com>
Subject: Re: [PATCH 3/4] error: Remove NULL checks on error_propagate() calls (again)
Date: Thu, 23 Jul 2020 08:42:03 -0500	[thread overview]
Message-ID: <38ee54d6-5de2-8816-f6b2-1924dcd0ab71@redhat.com> (raw)
In-Reply-To: <87eep2fj1f.fsf@dusky.pond.sub.org>

On 7/23/20 8:38 AM, Markus Armbruster wrote:

>>>> +++ b/migration/colo.c
>>>> @@ -798,9 +798,7 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,
>>>>          colo_send_message(mis->to_src_file,
>>>> COLO_MESSAGE_VMSTATE_LOADED,
>>>>                     &local_err);
>>>> -    if (local_err) {
>>>> -        error_propagate(errp, local_err);
>>>> -    }
>>>> +    error_propagate(errp, local_err);
>>>>    }
>>>
>>> As this is mechanical, it is fine. But there is now a further cleanup
>>> possible of passing errp directly to colo_send_message, and possibly
>>> dropping local_err altogether.
>>
>> True.
>>
>> The patch is small and simple enough for squashing in further manual
>> cleanups.  I'd like to first check whether a followup patch created with
>> the machinery I used for eliminating error_propagate() comes out better.
> 
> Vladimir's scripts/coccinelle/errp-guard.cocci will take care of it.

Good to know.  Then I'm fine deferring those cleanups to the mechanical 
patches down the road, rather than a manual effort now.

> 
> Eliminating error propagation altogether would be even better, but it's
> also more work: several void functions need to return bool instead.

Correct, but also doesn't change the fact that this patch is ready to go 
regardless of how much further cleanup we plan on doing.

> 
>>> Reviewed-by: Eric Blake <eblake@redhat.com>
>>
>> Thanks!

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-07-23 13:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22  8:40 [PATCH 0/4] error: Mechanical fixes & cleanups Markus Armbruster
2020-07-22  8:40 ` [PATCH 1/4] coccinelle/err-bad-newline: Fix for Python 3, and add patterns Markus Armbruster
2020-07-22 13:28   ` Eric Blake
2020-07-22  8:40 ` [PATCH 2/4] error: Strip trailing '\n' from error string arguments (again) Markus Armbruster
2020-07-22 10:04   ` Philippe Mathieu-Daudé
2020-07-22 10:33   ` David Gibson
2020-07-22 12:46   ` Peter Xu
2020-07-22  8:40 ` [PATCH 3/4] error: Remove NULL checks on error_propagate() calls (again) Markus Armbruster
2020-07-22 13:31   ` Eric Blake
2020-07-23  9:14     ` Markus Armbruster
2020-07-23 13:38       ` Markus Armbruster
2020-07-23 13:42         ` Eric Blake [this message]
2020-07-22  8:40 ` [PATCH 4/4] error: Use error_fatal to simplify obvious fatal errors (again) Markus Armbruster
2020-07-22  8:42   ` David Hildenbrand
2020-07-24 13:45 ` [PATCH 0/4] error: Mechanical fixes & cleanups Markus Armbruster

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=38ee54d6-5de2-8816-f6b2-1924dcd0ab71@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jfreimann@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.