[PATCH] rt: fix a build error on locking-selftest.c

From: Frederic Weisbecker
Date: Sun Feb 22 2009 - 22:34:38 EST


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@xxxxxxxxx>
---
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/