From 6b83d77fb7b24b77272b45a8c35aae1cb64ba62b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sun, 9 Dec 2018 23:01:42 -0500 Subject: [PATCH] smp: Make {acquire|release}_read_seqlock_inline cast explicitly. Also fix braces. --- headers/private/kernel/smp.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/headers/private/kernel/smp.h b/headers/private/kernel/smp.h index 0da58a0cd3..dc45086792 100644 --- a/headers/private/kernel/smp.h +++ b/headers/private/kernel/smp.h @@ -282,14 +282,16 @@ release_write_seqlock_inline(seqlock* lock) { static inline uint32 -acquire_read_seqlock_inline(seqlock* lock) { - return atomic_get((int32*)&lock->count); +acquire_read_seqlock_inline(seqlock* lock) +{ + return (uint32)atomic_get((int32*)&lock->count); } static inline bool -release_read_seqlock_inline(seqlock* lock, uint32 count) { - uint32 current = atomic_get((int32*)&lock->count); +release_read_seqlock_inline(seqlock* lock, uint32 count) +{ + uint32 current = (uint32)atomic_get((int32*)&lock->count); return count % 2 == 0 && current == count; }