Received: from eggs.gnu.org ([2001:4830:134:3::10]:53145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c58bJ-00067V-DQ for qemu-devel@nongnu.org; Fri, 11 Nov 2016 04:58:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c58bG-0008OH-DO for qemu-devel@nongnu.org; Fri, 11 Nov 2016 04:58:25 -0500 Sender: Paolo Bonzini References: <1478798349-28983-1-git-send-email-kwolf@redhat.com> <1478798349-28983-3-git-send-email-kwolf@redhat.com> From: Paolo Bonzini Message-ID: <9f504fa5-4a90-8b19-919d-d45b1a00944a@redhat.com> Date: Fri, 11 Nov 2016 10:58:18 +0100 MIME-Version: 1.0 In-Reply-To: <1478798349-28983-3-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 2/8] quorum: Remove s from quorum_aio_get() arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org, mreitz@redhat.com On 10/11/2016 18:19, Kevin Wolf wrote: > There is no point in passing the value of bs->opaque in order to > overwrite it with itself. > > Signed-off-by: Kevin Wolf > --- > block/quorum.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/block/quorum.c b/block/quorum.c > index d122299..dfa9fd3 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -171,18 +171,17 @@ static bool quorum_64bits_compare(QuorumVoteValue *a, QuorumVoteValue *b) > return a->l == b->l; > } > > -static QuorumAIOCB *quorum_aio_get(BDRVQuorumState *s, > - BlockDriverState *bs, > +static QuorumAIOCB *quorum_aio_get(BlockDriverState *bs, > QEMUIOVector *qiov, > uint64_t sector_num, > int nb_sectors, > BlockCompletionFunc *cb, > void *opaque) > { > + BDRVQuorumState *s = bs->opaque; > QuorumAIOCB *acb = qemu_aio_get(&quorum_aiocb_info, bs, cb, opaque); > int i; > > - acb->common.bs->opaque = s; > acb->sector_num = sector_num; > acb->nb_sectors = nb_sectors; > acb->qiov = qiov; > @@ -691,7 +690,7 @@ static BlockAIOCB *quorum_aio_readv(BlockDriverState *bs, > void *opaque) > { > BDRVQuorumState *s = bs->opaque; > - QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, > + QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num, > nb_sectors, cb, opaque); > acb->is_read = true; > acb->children_read = 0; > @@ -711,7 +710,7 @@ static BlockAIOCB *quorum_aio_writev(BlockDriverState *bs, > void *opaque) > { > BDRVQuorumState *s = bs->opaque; > - QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, nb_sectors, > + QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num, nb_sectors, > cb, opaque); > int i; > > Reviewed-by: Paolo Bonzini