Re: [PATCH v5 2/2] lockable: replaced locks with lock guard macros where appropriate

2020-04-11 Thread Daniel Brodsky
On Fri, Apr 3, 2020 at 9:21 PM wrote: > > From: Daniel Brodsky > > - ran regexp "qemu_mutex_lock\(.*\).*\n.*if" to find targets > - replaced result with QEMU_LOCK_GUARD if all unlocks at function end > - replaced result with WITH_QEMU_LOCK_GUARD if unlock not at e

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-29 Thread Daniel Brodsky
On Sat, Mar 28, 2020 at 9:12 AM Richard Henderson wrote: > > On 3/27/20 11:38 PM, Daniel Brodsky wrote: > > On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson > > wrote: > >> > >> My preference is to add -Wno-tautological-type-limit-compare in > >> co

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-27 Thread Daniel Brodsky
On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson wrote: > > My preference is to add -Wno-tautological-type-limit-compare in > configure, so we don't have to work around this same issue elsewhere > in the code base. > > r~ What do you think would be the best way to add this? I could change all a

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-25 Thread Daniel Brodsky
> > There may be ways to rewrite that expression to avoid triggering the > warning on a 32-bit platform. Untested, but does this help: > > if (sizeof(mask) > 4 && mask <= 0xu) { > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qe

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-23 Thread Daniel Brodsky
On Mon, Mar 23, 2020 at 6:25 AM Stefan Hajnoczi wrote: > > On Fri, Mar 20, 2020 at 06:43:23AM -0700, no-re...@patchew.org wrote: > > /tmp/qemu-test/src/util/thread-pool.c:213:5: error: unused variable > > 'qemu_lockable_auto1' [-Werror,-Wunused-variable] > > QEMU_LOCK_GUARD(&pool->lock); > >

Re: [PATCH v3 2/2] lockable: replaced locks with lock guard macros where appropriate

2020-03-20 Thread Daniel Brodsky
On Fri, Mar 20, 2020 at 5:34 AM Dr. David Alan Gilbert wrote: > > * dnbrd...@gmail.com (dnbrd...@gmail.com) wrote: > > From: Daniel Brodsky > > > > - ran regexp "qemu_mutex_lock\(.*\).*\n.*if" to find targets > > - replaced result with QEMU_L

Re: [PATCH v2 2/2] lockable: replaced locks with lock guard macros where appropriate

2020-03-20 Thread Daniel Brodsky
On Fri, Mar 20, 2020 at 5:06 AM Paolo Bonzini wrote: > > On 20/03/20 00:34, dnbrd...@gmail.com wrote: > > index 682abd8e09..89f8a656a4 100644 > > --- a/block/iscsi.c > > +++ b/block/iscsi.c > > @@ -1086,7 +1086,7 @@ static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState > > *bs, > > acb->task->

Re: [PATCH] lockable: replaced locks with lock guard macros where appropriate

2020-03-19 Thread Daniel Brodsky
On Thu, Mar 19, 2020 at 1:53 PM Eric Blake wrote: > > Hmm. This one is a different failure than the other patchew warnings > about variable redefinition; but is still evidence that it is missing > your "[PATCH] misc: fix __COUNTER__ macro to be referenced properly". > At any rate, the fact that w

Re: [PATCH] lockable: replaced locks with lock guard macros where appropriate

2020-03-19 Thread Daniel Brodsky
On Thu, Mar 19, 2020 at 1:48 PM Eric Blake wrote: > > On 3/19/20 11:19 AM, dnbrd...@gmail.com wrote: > > From: danbrodsky > > > > - ran regexp "qemu_mutex_lock\(.*\).*\n.*if" to find targets > > - replaced result with QEMU_LOCK_GUARD if all unlocks at function end > > - replaced result with WITH_