Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iK0uZ-0004h5-PC for mharc-qemu-riscv@gnu.org; Mon, 14 Oct 2019 10:01:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK0uR-0004Uf-OL for qemu-riscv@nongnu.org; Mon, 14 Oct 2019 10:01:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK0uQ-0008CU-Dw for qemu-riscv@nongnu.org; Mon, 14 Oct 2019 10:01:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iK0uC-000828-91; Mon, 14 Oct 2019 10:01:02 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62DE020FD; Mon, 14 Oct 2019 14:00:56 +0000 (UTC) Received: from [10.3.116.168] (ovpn-116-168.phx2.redhat.com [10.3.116.168]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDD0E5C541; Mon, 14 Oct 2019 14:00:19 +0000 (UTC) Subject: Re: [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp To: Vladimir Sementsov-Ogievskiy , "qemu-devel@nongnu.org" Cc: "armbru@redhat.com" , Gerd Hoffmann , "Gonglei (Arei)" , Eduardo Habkost , Igor Mammedov , Laurent Vivier , Amit Shah , Kevin Wolf , Max Reitz , John Snow , Ari Sundholm , Pavel Dovgalyuk , Paolo Bonzini , Stefan Hajnoczi , Fam Zheng , Stefan Weil , Ronnie Sahlberg , Peter Lieven , Denis Lunev , Alberto Garcia , Jason Dillaman , Wen Congyang , Xie Changlong , Liu Yuan , "Richard W.M. Jones" , Jeff Cody , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= , Richard Henderson , Greg Kurz , "Michael S. Tsirkin" , Marcel Apfelbaum , Beniamino Galvani , Peter Maydell , =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Andrew Jeffery , Joel Stanley , Andrew Baumann , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Antony Pavlov , Jean-Christophe Dubois , Peter Chubb , Subbaraya Sundeep , Eric Auger , Alistair Francis , "Edgar E. Iglesias" , Stefano Stabellini , Anthony Perard , Paul Durrant , Paul Burton , Aleksandar Rikalo , Chris Wulff , Marek Vasut , David Gibson , Cornelia Huck , Halil Pasic , Christian Borntraeger , =?UTF-8?Q?Herv=c3=a9_Poussineau?= , Xiao Guangrong , Aurelien Jarno , Aleksandar Markovic , Mark Cave-Ayland , Jason Wang , Laszlo Ersek , Yuval Shaia , Palmer Dabbelt , Sagar Karandikar , Bastian Koppelmann , David Hildenbrand , Thomas Huth , Eric Farman , Matthew Rosato , Hannes Reinecke , Michael Walle , Artyom Tarasenko , Stefan Berger , Samuel Thibault , Alex Williamson , Tony Krowiak , Pierre Morel , Michael Roth , Hailiang Zhang , Juan Quintela , "Dr. David Alan Gilbert" , Luigi Rizzo , Giuseppe Lettieri , Vincenzo Maffione , Jan Kiszka , Anthony Green , Stafford Horne , Guan Xuetao , Max Filippov , "qemu-block@nongnu.org" , "integration@gluster.org" , "sheepdog@lists.wpkg.org" , "qemu-arm@nongnu.org" , "xen-devel@lists.xenproject.org" , "qemu-ppc@nongnu.org" , "qemu-s390x@nongnu.org" , "qemu-riscv@nongnu.org" References: <20191011160552.22907-1-vsementsov@virtuozzo.com> <20191011160552.22907-26-vsementsov@virtuozzo.com> <5dd4d642-7ea6-42a2-66fc-6d6710b77b8d@redhat.com> <6856bd09-65fc-30d7-2a3c-c85334a024e9@virtuozzo.com> From: Eric Blake Organization: Red Hat, Inc. Message-ID: Date: Mon, 14 Oct 2019 09:00:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <6856bd09-65fc-30d7-2a3c-c85334a024e9@virtuozzo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 14 Oct 2019 14:00:57 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2019 14:01:21 -0000 On 10/14/19 3:19 AM, Vladimir Sementsov-Ogievskiy wrote: >>> +| >>> +-=C2=A0=C2=A0=C2=A0 error_propagate(errp, local_err); >>> +) >>> +=C2=A0=C2=A0=C2=A0=C2=A0 ...> >>> + } >>> + >> >> It looks like once this script is run, error_propagate_prepend() will = have no clients. >=20 > No, it still have a bit, when working with error_copy, and/or moving er= rors from/to structures. No public clients. So can we turn it into a static function only used by=20 error.c? >=20 >> Is there a non-generated cleanup patch that removes it (and once it is= removed, it can also be removed from the .cocci script as no further cli= ents will reappear later)? >=20 > Maybe. >=20 Basically, if we can get error_propagate out of error.h, that's a good=20 sign. But it's not a show-stopper if we can't do it for some legitimate=20 reason (such a reason might include that the definition of the=20 ERRP_AUTO_PROPAGATE macro is easier to write if error_propagate remains=20 in the .h), so we'll just have to see what is possible. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org