Received: from eggs.gnu.org ([2001:4830:134:3::10]:48126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkYNz-0006QK-NU for qemu-devel@nongnu.org; Fri, 09 Oct 2015 10:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkYNy-0002Ys-Vm for qemu-devel@nongnu.org; Fri, 09 Oct 2015 10:11:03 -0400 Date: Fri, 9 Oct 2015 16:10:53 +0200 From: Kevin Wolf Message-ID: <20151009141053.GG3956@noname.redhat.com> References: <1444369526-2227-1-git-send-email-famz@redhat.com> <1444369526-2227-6-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444369526-2227-6-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 05/12] aio: introduce aio_{disable, enable}_clients List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Paolo Bonzini , qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi Am 09.10.2015 um 07:45 hat Fam Zheng geschrieben: > Signed-off-by: Fam Zheng > +void aio_disable_enable_clients(AioContext *ctx, int clients_mask, > + bool is_disable) > +{ > + int i = 1; > + int n = 0; > + aio_context_acquire(ctx); > + > + while (clients_mask) { > + bool b = clients_mask & 0x1; > + clients_mask >>= 1; > + n++; > + i <<= 1; > + if (!b) { > + continue; > + } > + if (ctx->client_disable_counters[n]) { > + return true; async.c: In function 'aio_disable_enable_clients': async.c:401:13: error: 'return' with a value, in function returning void [-Werror] return true; > + } > + } > + aio_context_release(ctx); > +} Kevin