[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.
- [Qemu-devel] [PATCH 0/7] error: On abort, report where the error was created, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 1/7] error: De-duplicate code creating Error objects, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 5/7] error: error_set_errno() is unused, drop, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 4/7] qga/vss-win32: Document the DLL requires non-null errp, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 2/7] error: Make error_setg() a function, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 6/7] error: Revamp interface documentation, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 3/7] qga: Clean up unnecessarily dirty casts, Markus Armbruster, 2015/06/22
- [Qemu-devel] [PATCH 7/7] error: On abort, report where the error was created, Markus Armbruster, 2015/06/22