public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rt: fix a build error on locking-selftest.c
@ 2009-02-23  3:31 Frederic Weisbecker
  0 siblings, 0 replies; only message in thread
From: Frederic Weisbecker @ 2009-02-23  3:31 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel

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 <fweisbec@gmail.com>
---
 lib/locking-selftest.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index 0732078..9520632 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -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(&current->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(&current->lock_count, saved_lock_count);
 #endif
 }
 
-- 
1.6.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-23  3:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23  3:31 [PATCH] rt: fix a build error on locking-selftest.c Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox