From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rt: fix a build error on locking-selftest.c
Date: Mon, 23 Feb 2009 04:31:22 +0100 [thread overview]
Message-ID: <49a21941.0a04d00a.5f94.1245@mx.google.com> (raw)
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(¤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
}
--
1.6.1
reply other threads:[~2009-02-23 3:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49a21941.0a04d00a.5f94.1245@mx.google.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox