Re: [GIT PULL] core/locking changes for v3.1

From: Peter Zijlstra
Date: Mon Jul 25 2011 - 06:05:35 EST


On Sun, 2011-07-24 at 21:06 -0400, Arnaud Lacombe wrote:
> > Peter Zijlstra (1):
> > lockdep: Fix lockdep_no_validate against IRQ states
> >
> from today's master, this last commit triggers:
>
> /src/linux/linux/kernel/lockdep.c: In function 'mark_held_locks':
> /src/linux/linux/kernel/lockdep.c:2471:31: warning: comparison of
> distinct pointer types lacks a cast
>
> I'm not sure if both struct member and variable's type are correct nor
> the comparability between `struct lockdep_subclass_key *' and `struct
> lock_class_key *'. So I'll let you fix this.

Argh, I really need -Werror to even see warnings, compiler output just
flies by waaaaaay too fast.

The warning is harmless in this case, but the below makes it go away.

---
kernel/lockdep.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 3956f51..99906aa 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2468,7 +2468,7 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)

BUG_ON(usage_bit >= LOCK_USAGE_STATES);

- if (hlock_class(hlock)->key == &__lockdep_no_validate__)
+ if (hlock_class(hlock)->key == __lockdep_no_validate__.subkeys)
continue;

if (!mark_lock(curr, hlock, usage_bit))


--
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/