From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBTRa-0006Cf-Oh for qemu-devel@nongnu.org; Fri, 10 Jun 2016 16:54:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBTRY-0002Ja-JS for qemu-devel@nongnu.org; Fri, 10 Jun 2016 16:54:17 -0400 References: <1465589538-24998-1-git-send-email-ehabkost@redhat.com> <1465589538-24998-2-git-send-email-ehabkost@redhat.com> From: Eric Blake Message-ID: <575B28F1.7060605@redhat.com> Date: Fri, 10 Jun 2016 14:54:09 -0600 MIME-Version: 1.0 In-Reply-To: <1465589538-24998-2-git-send-email-ehabkost@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dtb1jwca854u9vfp6biTqrfUjnpx89f6T" Subject: Re: [Qemu-devel] [PATCH v2 1/3] error: Remove NULL checks on error_propagate() calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org, Markus Armbruster Cc: kwolf@redhat.com, borntraeger@de.ibm.com, qemu-block@nongnu.org, cornelia.huck@de.ibm.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dtb1jwca854u9vfp6biTqrfUjnpx89f6T Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > error_propagate() already ignores local_err=3D=3DNULL, so there's no > need to check it before calling. >=20 > Coccinelle patch used to perform the changes added to > scripts/coccinelle/error_propagate_null.cocci. >=20 > Signed-off-by: Eduardo Habkost > --- > block.c | 20 +++++--------------= > block/qcow2.c | 4 +--- > block/quorum.c | 4 +--- > block/raw-posix.c | 16 ++++----------- > block/raw_bsd.c | 4 +--- > block/snapshot.c | 4 +--- > blockdev.c | 12 +++--------- > bootdevice.c | 4 +--- > dump.c | 4 +--- > hw/ide/qdev.c | 4 +--- > hw/net/ne2000-isa.c | 4 +--- > hw/s390x/virtio-ccw.c | 28 +++++++------------= -------- > hw/usb/dev-storage.c | 4 +--- > qga/commands-win32.c | 8 ++------ > qom/object.c | 4 +--- > scripts/coccinelle/error_propagate_null.cocci | 10 ++++++++++ > 16 files changed, 41 insertions(+), 93 deletions(-) > create mode 100644 scripts/coccinelle/error_propagate_null.cocci You can do: git config diff.orderFile /path/to/file and then set up a list of globs in /path/to/file in order to influence your diffs; in my case, I stuck 'scripts/coccinelle/*' near the top of my order file, as I find that to be a more useful part of the patch than the churn from running it. But it doesn't affect patch correctness, just ease of review. Reviewed-by: Eric Blake > +++ b/scripts/coccinelle/error_propagate_null.cocci > @@ -0,0 +1,10 @@ > +// error_propagate() already ignores local_err=3D=3DNULL, so there's > +// no need to check it before calling. > + > +@@ > +identifier L; > +expression E; > +@@ > +-if (L) { > + error_propagate(E, L); > +-} >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --dtb1jwca854u9vfp6biTqrfUjnpx89f6T Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXWyjxAAoJEKeha0olJ0NqOUIH/0U8N70YHOyuXJp0BPeDE8vG e06S3BhzV5cI959FTKWGMi1Ol4b79X7zFAdkl9tT1HMZpODKoBBuKR6iSaC4Pk/O tXzImmavJSzDUNNpIUq831UT3c4Glhsev6lThzxIkZNfsyV75/zIrOwx8K3Tl2HC 91x7VlczD60zQFdgYuWQh6iz58PYFjVt1JlN+HD4rlnsJR0bvuxKeK435uEURyJo qdEPViWMcc6Vy8Hjp8EzxLm5qQ9Ng/rod2rQM6KnYVLsI7RVsq8HAeZuQ+qeA25z ioxgn4f7kQfZE+cnAmGc+xSMvqThUEVbe83wPu8CrHtO55ePbD3PrnNrWyNSDjg= =+wzY -----END PGP SIGNATURE----- --dtb1jwca854u9vfp6biTqrfUjnpx89f6T--