From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNro9-0002ns-Mc for qemu-devel@nongnu.org; Thu, 14 Jul 2016 21:20:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNro8-0005QJ-1b for qemu-devel@nongnu.org; Thu, 14 Jul 2016 21:20:48 -0400 References: <1468501038-10056-1-git-send-email-caoj.fnst@cn.fujitsu.com> <57879D51.70906@redhat.com> From: Cao jin Message-ID: <57883BFB.1070808@cn.fujitsu.com> Date: Fri, 15 Jul 2016 09:27:23 +0800 MIME-Version: 1.0 In-Reply-To: <57879D51.70906@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3] aio-posix: remove useless parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Fam Zheng On 07/14/2016 10:10 PM, Eric Blake wrote: > 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. >> >> 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(-) >> >> v3 changelog: >> 1. printf errno, and fix build failure on Windows (Stefan) >> >> >> 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; >> } >> >> -void aio_context_setup(AioContext *ctx, Error **errp) >> +void aio_context_setup(AioContext *ctx) >> { >> #ifdef CONFIG_EPOLL_CREATE1 >> assert(!ctx->epollfd); >> ctx->epollfd = epoll_create1(EPOLL_CLOEXEC); >> if (ctx->epollfd == -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 meaningful. > strerror came to my mind first, I regret not using it:P -- Yours Sincerely, Cao jin