From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enleI-0007cW-Vn for qemu-devel@nongnu.org; Mon, 19 Feb 2018 08:38:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enleI-0007zl-5H for qemu-devel@nongnu.org; Mon, 19 Feb 2018 08:38:31 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55828 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1enleH-0007zc-Vg for qemu-devel@nongnu.org; Mon, 19 Feb 2018 08:38:30 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BDD340363B6 for ; Mon, 19 Feb 2018 13:38:29 +0000 (UTC) References: <1519031728-9850-1-git-send-email-thuth@redhat.com> <1519031728-9850-2-git-send-email-thuth@redhat.com> From: Eric Blake Message-ID: Date: Mon, 19 Feb 2018 07:38:26 -0600 MIME-Version: 1.0 In-Reply-To: <1519031728-9850-2-git-send-email-thuth@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 1/8] net: Move error reporting from net_init_client/netdev to the calling site List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , qemu-devel@nongnu.org, Jason Wang , "Dr. David Alan Gilbert" Cc: Paolo Bonzini , Markus Armbruster , Stefan Hajnoczi On 02/19/2018 03:15 AM, Thomas Huth wrote: > It looks strange that net_init_client() and net_init_netdev() both > take an "Error **errp" parameter, but then do the error reporting > with "error_report_err(local_err)" on their own. Let's move the > error reporting to the calling site instead to simplify this code > a little bit. > > Signed-off-by: Thomas Huth > --- > include/net/net.h | 2 +- > net/net.c | 29 +++++------------------------ > vl.c | 3 ++- > 3 files changed, 8 insertions(+), 26 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org