Received: from eggs.gnu.org ([2001:4830:134:3::10]:54507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Iu6-0000Qo-ON for qemu-devel@nongnu.org; Tue, 23 Jun 2015 03:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7Iu1-0007Zh-OR for qemu-devel@nongnu.org; Tue, 23 Jun 2015 03:45:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Iu1-0007Zc-77 for qemu-devel@nongnu.org; Tue, 23 Jun 2015 03:45:53 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 9221CBAEDC for ; Tue, 23 Jun 2015 07:45:52 +0000 (UTC) From: Markus Armbruster References: <1435001200-20610-1-git-send-email-armbru@redhat.com> <1435001200-20610-3-git-send-email-armbru@redhat.com> <55888070.2050906@redhat.com> Date: Tue, 23 Jun 2015 09:45:50 +0200 In-Reply-To: <55888070.2050906@redhat.com> (Eric Blake's message of "Mon, 22 Jun 2015 15:38:56 -0600") Message-ID: <87fv5izx3l.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/7] error: Make error_setg() a function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: pbonzini@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com Eric Blake 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 >> --- >> include/qapi/error.h | 4 ++-- >> util/error.c | 9 +++++++++ >> 2 files changed, 11 insertions(+), 2 deletions(-) > > Reviewed-by: Eric Blake > > (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.