qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/46] error: Avoid more error_propagate() when error is not


From: Eric Blake
Subject: Re: [PATCH 07/46] error: Avoid more error_propagate() when error is not used here
Date: Thu, 25 Jun 2020 09:41:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 6/25/20 7:50 AM, Markus Armbruster wrote:
Eric Blake <eblake@redhat.com> writes:

On 6/24/20 11:43 AM, Markus Armbruster wrote:
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away.  The previous commit did that for simple cases with
Coccinelle.  Do it for a few more manually.


         if (!bus && qdev_hotplug &&
!qdev_get_machine_hotplug_handler(dev)) {
           /* No bus, no machine hotplug handler --> device is not hotpluggable 
*/
-        error_setg(&err, "Device '%s' can not be hotplugged on this machine",
+        error_setg(errp, "Device '%s' can not be hotplugged on this machine",

Should we s/can not/cannot/ while touching this?

The longer and the more mechanical the patch, the less willing I am to
include "while we're there" improvements.  This one may still be okay.
But you pointed out a few more error message improvements in later
reviews.  Perhaps collecting them all into an omnibus error message
patch would be better.

Yes, collecting a single followup patch for grammar/spelling fixes found throughout the series is a good idea.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]