rt: fix a build error on locking-selftest.c
Subsystems (2)
PATCH 1/1 rt: fix a build error on locking-selftest.c
Fix a build error while rt mutexes selftests:
lib/locking-selftest.c: In function ‘dotest’:lib/locking-selftest.c:951: erreur: incompatible types in initialization lib/locking-selftest.c:1003: erreur: incompatible types in assignment
lock_count is of type atomic_t.
Signed-off-by Frederic Weisbecker <[email protected]>
--- lib/locking-selftest.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
lib/locking-selftest.c +2 -2
@@ -948,7 +948,7 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)unsigned long saved_preempt_count =preempt_count ();int expected_failure =0 ;#if defined(CONFIG_DEBUG_PREEMPT ) && defined(CONFIG_DEBUG_RT_MUTEXES ) -int saved_lock_count = current->lock_count; +int saved_lock_count =atomic_read (¤t->lock_count);#endif WARN_ON (irqs_disabled ());
@@ -1000,7 +1000,7 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)reset_locks ();#if defined(CONFIG_DEBUG_PREEMPT ) && defined(CONFIG_DEBUG_RT_MUTEXES ) - current->lock_count = saved_lock_count; +atomic_set (¤t->lock_count, saved_lock_count);#endif }
Signature · 1 line
1.6.1