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

2020-04-03 Thread dnbrdsky
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 end Signed-off-by: Daniel Brodsky --- block/iscsi.c | 7 ++

[PATCH v5 1/2] lockable: fix __COUNTER__ macro to be referenced properly

2020-04-03 Thread dnbrdsky
From: Daniel Brodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Fixes: 3284c3ddc4 Signed-off-by: Daniel Brodsky --- include/qemu/lockable.h | 7 --- include/qemu/rcu.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-)

[PATCH v5 0/2] Replaced locks with lock guard macros

2020-04-03 Thread dnbrdsky
From: Daniel Brodsky This patch set adds: - a fix for lock guard macros so they can be used multiple times in the same function - replacement of locks with lock guards where appropriate v4 -> v5: - added G_GNUC_UNUSED to lock guard macro to supress unused var warning v3 -> v4: - removed

[PATCH] misc: fix __COUNTER__ macro to be referenced properly

2020-03-19 Thread dnbrdsky
From: danbrodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Signed-off-by: danbrodsky --- include/qemu/lockable.h | 2 +- include/qemu/rcu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

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

2020-03-19 Thread dnbrdsky
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_QEMU_LOCK_GUARD if unlock not at end Signed-off-by: danbrodsky --- block/iscsi.c | 23 +++

[PATCH v2 0/2] Replaced locks with lock guard macros

2020-03-19 Thread dnbrdsky
From: Daniel Brodsky This patch set adds: - a fix for lock guard macros so they can be used multiple times in the same function - replacement of locks with lock guards where appropriate v1 -> v2: - fixed whitespace churn - added cover letter so patch set referenced correctly Daniel Brodsky

[PATCH v3 0/2] Replaced locks with lock guard macros

2020-03-20 Thread dnbrdsky
From: Daniel Brodsky This patch set adds: - a fix for lock guard macros so they can be used multiple times in the same function - replacement of locks with lock guards where appropriate v2 -> v3: - added __COUNTER__ fix for additional lock guard macro - added missing include header in

[PATCH v3 1/2] lockable: fix __COUNTER__ macro to be referenced properly

2020-03-20 Thread dnbrdsky
From: Daniel Brodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Fixes: 3284c3ddc4 Signed-off-by: Daniel Brodsky --- include/qemu/lockable.h | 4 ++-- include/qemu/rcu.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)

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

2020-03-20 Thread dnbrdsky
From: Daniel Brodsky This patch set adds: - a fix for lock guard macros so they can be used multiple times in the same function - replacement of locks with lock guards where appropriate v3 -> v4: - removed unneeded unlocks from areas where lock guards are now used - dropped change to lock guard

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

2020-03-20 Thread dnbrdsky
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 end Signed-off-by: Daniel Brodsky --- block/iscsi.c | 11 +++---

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

2020-03-20 Thread dnbrdsky
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 end Signed-off-by: Daniel Brodsky --- block/iscsi.c | 7 ++

[PATCH v4 1/2] lockable: fix __COUNTER__ macro to be referenced properly

2020-03-20 Thread dnbrdsky
From: Daniel Brodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Fixes: 3284c3ddc4 Signed-off-by: Daniel Brodsky --- include/qemu/lockable.h | 4 ++-- include/qemu/rcu.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)

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

2020-03-19 Thread dnbrdsky
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 end Signed-off-by: Daniel Brodsky --- block/iscsi.c | 11 +++---

[PATCH v2 1/2] lockable: fix __COUNTER__ macro to be referenced properly

2020-03-19 Thread dnbrdsky
From: Daniel Brodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Fixes: 3284c3ddc4 Signed-off-by: Daniel Brodsky --- include/qemu/lockable.h | 2 +- include/qemu/rcu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)