From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCk28-0005G7-7P for qemu-devel@nongnu.org; Tue, 14 Jun 2016 04:49:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCk22-0008C5-BD for qemu-devel@nongnu.org; Tue, 14 Jun 2016 04:49:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCk22-0008BV-5n for qemu-devel@nongnu.org; Tue, 14 Jun 2016 04:49:10 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B292A85543 for ; Tue, 14 Jun 2016 08:49:09 +0000 (UTC) From: Markus Armbruster References: <1465855078-19435-1-git-send-email-ehabkost@redhat.com> <1465855078-19435-3-git-send-email-ehabkost@redhat.com> Date: Tue, 14 Jun 2016 10:49:07 +0200 In-Reply-To: <1465855078-19435-3-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Mon, 13 Jun 2016 18:57:57 -0300") Message-ID: <87inxckvek.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 2/3] error: Remove unnecessary local_err variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: qemu-devel@nongnu.org Eduardo Habkost writes: > This patch simplifies code that uses a local_err variable just to > immediately use it for an error_propagate() call. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/remove_local_err.cocci. > > Reviewed-by: Eric Blake > Acked-by: Cornelia Huck > Signed-off-by: Eduardo Habkost [...] > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 95ff5e3..b7112d0 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -180,10 +180,7 @@ static HotplugHandler *s390_get_hotplug_handler(MachineState *machine, > static void s390_hot_add_cpu(const int64_t id, Error **errp) > { > MachineState *machine = MACHINE(qdev_get_machine()); > - Error *err = NULL; > - I'd prefer to keep this blank line. Can touch up on commit to error-next. > - s390x_new_cpu(machine->cpu_model, id, &err); > - error_propagate(errp, err); > + s390x_new_cpu(machine->cpu_model, id, errp); > } > [...]