qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/7] error: Make error_setg() a function


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 2/7] error: Make error_setg() a function
Date: Tue, 23 Jun 2015 09:45:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 06/22/2015 01:26 PM, Markus Armbruster wrote:
>> Saves a tiny amount of code at every call site.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  include/qapi/error.h | 4 ++--
>>  util/error.c         | 9 +++++++++
>>  2 files changed, 11 insertions(+), 2 deletions(-)
>
> Reviewed-by: Eric Blake <address@hidden>
>
> (Interesting that you turn it back into a macro later in the series...)

Yes, in PATCH 7, but even then error_setg_internal() remains a function,
not a macro wrapper around error_set_internal(), thus we still save code
to pass a 0 argument at every call site.

Of course, PATCH 7 increases code size quite a bit more than this patch
decreases it: this patch deletes "pass 0 argument", PATCH 7 adds "pass
__FILE__ and __LINE__ arguments".  Plus the __FILE_ literals, but those
should be in cold memory.

If the increase bothers us, we could add suitable #ifdeffery to
optionally suppress it.  Seems not worth it to me.



reply via email to

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