All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] aio-posix: remove useless parameter
Date: Fri, 15 Jul 2016 09:27:23 +0800	[thread overview]
Message-ID: <57883BFB.1070808@cn.fujitsu.com> (raw)
In-Reply-To: <57879D51.70906@redhat.com>



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 <stefanha@redhat.com>
>> Cc: Fam Zheng <famz@redhat.com>
>> Cc: Eric Blake <eblake@redhat.com>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>>   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

      reply	other threads:[~2016-07-15  1:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 12:57 [Qemu-devel] [PATCH v3] aio-posix: remove useless parameter Cao jin
2016-07-14 14:10 ` Eric Blake
2016-07-15  1:27   ` Cao jin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57883BFB.1070808@cn.fujitsu.com \
    --to=caoj.fnst@cn.fujitsu.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.