From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNhLX-00017Z-MJ for qemu-devel@nongnu.org; Thu, 14 Jul 2016 10:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNhLW-0007s1-Br for qemu-devel@nongnu.org; Thu, 14 Jul 2016 10:10:35 -0400 References: <1468501038-10056-1-git-send-email-caoj.fnst@cn.fujitsu.com> From: Eric Blake Message-ID: <57879D51.70906@redhat.com> Date: Thu, 14 Jul 2016 08:10:25 -0600 MIME-Version: 1.0 In-Reply-To: <1468501038-10056-1-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0MND7MQNbXJIoaFwhlxX0nqNDHA3Q1Tme" Subject: Re: [Qemu-devel] [PATCH v3] aio-posix: remove useless parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Fam Zheng This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0MND7MQNbXJIoaFwhlxX0nqNDHA3Q1Tme From: Eric Blake To: Cao jin , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Fam Zheng Message-ID: <57879D51.70906@redhat.com> Subject: Re: [PATCH v3] aio-posix: remove useless parameter References: <1468501038-10056-1-git-send-email-caoj.fnst@cn.fujitsu.com> In-Reply-To: <1468501038-10056-1-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/14/2016 06:57 AM, Cao jin wrote: > Parameter **errp of aio_context_setup() is useless, remove it > and clean up the related code. >=20 > Cc: Stefan Hajnoczi > Cc: Fam Zheng > Cc: Eric Blake > Signed-off-by: Cao jin > --- > aio-posix.c | 3 ++- > aio-win32.c | 2 +- > async.c | 8 ++------ > include/block/aio.h | 2 +- > 4 files changed, 6 insertions(+), 9 deletions(-) >=20 > v3 changelog: > 1. printf errno, and fix build failure on Windows (Stefan) >=20 >=20 > diff --git a/aio-posix.c b/aio-posix.c > index 6006122..0bb4144 100644 > --- a/aio-posix.c > +++ b/aio-posix.c > @@ -485,12 +485,13 @@ bool aio_poll(AioContext *ctx, bool blocking) > return progress; > } > =20 > -void aio_context_setup(AioContext *ctx, Error **errp) > +void aio_context_setup(AioContext *ctx) > { > #ifdef CONFIG_EPOLL_CREATE1 > assert(!ctx->epollfd); > ctx->epollfd =3D epoll_create1(EPOLL_CLOEXEC); > if (ctx->epollfd =3D=3D -1) { > + fprintf(stderr, "Failed to create epoll instance: %d", errno);= Better is to use %s and strerror(errno), as a raw int isn't very meaningf= ul. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0MND7MQNbXJIoaFwhlxX0nqNDHA3Q1Tme 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/ iQEcBAEBCAAGBQJXh51RAAoJEKeha0olJ0NqLF4H/jMBQXUZuQz/qZ7vc/tZZ4Jq nl7VEZB5PpF3Scmk9vA2W08kcwZejTUBd7upuxrJeL/kar1iING70Y8UM1v+RqJN C6eQo4A7FUHhTdcCiUapaX/odlcmAbYs5dUVHRh9upZcEOaM/7O3BfAa9l10NDQY KCh46QY2rOUk+RG5+TgrJdOhIsZmnUFxv/b1qUq6Nl+qM6CWBNX6nRHHjCbPsMeK 1AEveLVEDU5XngirIOYDoGlaHMJhKqr1PhwR5+8XMjx40vVuA7N/X1cFNIQk55ct s5yylyRJEuycq81ds8yGy2jeehDdmp0Xwggd40w1yhq2ieQ+ZCz0Hv8gFkTbyn4= =fjrj -----END PGP SIGNATURE----- --0MND7MQNbXJIoaFwhlxX0nqNDHA3Q1Tme--