qemu-riscv
[Top][All Lists]
Advanced

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

Re: [RFC v5 025/126] scripts: add coccinelle script to use auto propagat


From: Eric Blake
Subject: Re: [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp
Date: Mon, 14 Oct 2019 09:00:19 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 10/14/19 3:19 AM, Vladimir Sementsov-Ogievskiy wrote:

+|
+-    error_propagate(errp, local_err);
+)
+     ...>
+ }
+

It looks like once this script is run, error_propagate_prepend() will have no 
clients.

No, it still have a bit, when working with error_copy, and/or moving errors 
from/to structures.

No public clients. So can we turn it into a static function only used by error.c?


Is there a non-generated cleanup patch that removes it (and once it is removed, 
it can also be removed from the .cocci script as no further clients will 
reappear later)?

Maybe.


Basically, if we can get error_propagate out of error.h, that's a good sign. But it's not a show-stopper if we can't do it for some legitimate reason (such a reason might include that the definition of the ERRP_AUTO_PROPAGATE macro is easier to write if error_propagate remains in the .h), so we'll just have to see what is possible.

--
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]