From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4UvP-0003DX-B6 for qemu-devel@nongnu.org; Mon, 15 Jun 2015 09:59:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4UvM-0000yf-6L for qemu-devel@nongnu.org; Mon, 15 Jun 2015 09:59:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4UvM-0000yU-1s for qemu-devel@nongnu.org; Mon, 15 Jun 2015 09:59:40 -0400 Message-ID: <557EDA4A.70005@redhat.com> Date: Mon, 15 Jun 2015 07:59:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1434205258-1932-1-git-send-email-armbru@redhat.com> <1434205258-1932-5-git-send-email-armbru@redhat.com> In-Reply-To: <1434205258-1932-5-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FS9BsQr6JlXarWjr5gGffTKrGkSCBx24m" Subject: Re: [Qemu-devel] [PATCH 04/11] qerror: Eliminate QERR_DEVICE_NOT_FOUND List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, stefanha@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FS9BsQr6JlXarWjr5gGffTKrGkSCBx24m Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/13/2015 08:20 AM, Markus Armbruster wrote: > Error classes other than ERROR_CLASS_GENERIC_ERROR should not be used > in new code. Hiding them in QERR_ macros makes new uses hard to spot. > Fortunately, there's just one such macro left. Eliminate it with this > coccinelle semantic patch: >=20 > @@ > expression EP, E; > @@ > -error_set(EP, QERR_DEVICE_NOT_FOUND, E) > +error_set(EP, ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found= ", E) >=20 > Signed-off-by: Markus Armbruster > --- > backends/rng-egd.c | 3 ++- > blockdev-nbd.c | 3 ++- > blockdev.c | 33 ++++++++++++++++++++++----------- > hmp.c | 6 ++++-- > include/qapi/qmp/qerror.h | 3 --- > net/net.c | 6 ++++-- > qdev-monitor.c | 6 ++++-- > qmp.c | 12 ++++++++---- > qom/object.c | 6 ++++-- > ui/input.c | 3 ++- > 10 files changed, 52 insertions(+), 29 deletions(-) Plain transformation would be closer to a 1:1 insertion/deletion count. The larger insertion count is due to reflowing long lines after the transformation. Does coccinelle do that for you, or do you have to touch things up manually? But I'm okay with the result. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --FS9BsQr6JlXarWjr5gGffTKrGkSCBx24m 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/ iQEcBAEBCAAGBQJVftpKAAoJEKeha0olJ0NqxgUIAJRFyg7CVuyJv8P/Yq9RXmKg NHY0WjB+a4S2ez6ifm5OpQ1U95Jz1K7ocVC+Tfa5VeB3bWKtfiO5qprztoFGGSgo 79uWPMzXUd50qXP8eN+HMR3D9CP1Aq/kBi+w22azqOznDDiJ1gNebtUF3K6bfsJl 0gvDUbanVY/FOEvTUWUD9E00gj1B+WI3eEKovObhcYWsIXzOpwhx6q26hEMXKm0f KL6bleqtBfWq0VU6R6XRS9L4XJDyoC1ZIu5R5evE82LCphGwnN71iMkCSf6ohafe gDkCnibRu8FSFZlUuKK1+7yzNlIHUO6HrfuUiXsKj63lt32J0ZBDWVD9NL+H3IQ= =AgcT -----END PGP SIGNATURE----- --FS9BsQr6JlXarWjr5gGffTKrGkSCBx24m--