[PATCH v2 3/5] thread: de-const qemu_spin_destroy

Emilio Cota posted 5 patches 3 years, 1 month ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, "Alex Bennée" <alex.bennee@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>
There is a newer version of this series
[PATCH v2 3/5] thread: de-const qemu_spin_destroy
Posted by Emilio Cota 3 years, 1 month ago
Signed-off-by: Emilio Cota <cota@braap.org>
---
 include/qemu/thread.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/qemu/thread.h b/include/qemu/thread.h
index 7c6703bce3..7841084199 100644
--- a/include/qemu/thread.h
+++ b/include/qemu/thread.h
@@ -237,11 +237,10 @@ static inline void qemu_spin_init(QemuSpin *spin)
 #endif
 }
 
-/* const parameter because the only purpose here is the TSAN annotation */
-static inline void qemu_spin_destroy(const QemuSpin *spin)
+static inline void qemu_spin_destroy(QemuSpin *spin)
 {
 #ifdef CONFIG_TSAN
-    __tsan_mutex_destroy((void *)spin, __tsan_mutex_not_static);
+    __tsan_mutex_destroy(spin, __tsan_mutex_not_static);
 #endif
 }
 
-- 
2.34.1
Re: [PATCH v2 3/5] thread: de-const qemu_spin_destroy
Posted by Alex Bennée 3 years, 1 month ago
Emilio Cota <cota@braap.org> writes:

> Signed-off-by: Emilio Cota <cota@braap.org>
> ---
>  include/qemu/thread.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/qemu/thread.h b/include/qemu/thread.h
> index 7c6703bce3..7841084199 100644
> --- a/include/qemu/thread.h
> +++ b/include/qemu/thread.h
> @@ -237,11 +237,10 @@ static inline void qemu_spin_init(QemuSpin *spin)
>  #endif
>  }
>  
> -/* const parameter because the only purpose here is the TSAN annotation */
> -static inline void qemu_spin_destroy(const QemuSpin *spin)
> +static inline void qemu_spin_destroy(QemuSpin *spin)
>  {
>  #ifdef CONFIG_TSAN
> -    __tsan_mutex_destroy((void *)spin, __tsan_mutex_not_static);
> +    __tsan_mutex_destroy(spin, __tsan_mutex_not_static);
>  #endif
>  }

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro