diff options
| author | Johannes Berg <[email protected]> | 2013-02-21 16:42:47 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2013-02-21 17:22:19 -0800 |
| commit | b1ae345d971664f70cfdc293029c40ccfb093591 (patch) | |
| tree | dcc1e4e8aed9da51a87eca71a8b133a001487381 /tools/perf/scripts/python | |
| parent | 3278bb748d2437eb1464765f36429e5d6aa91c38 (diff) | |
lockdep: make lockdep_assert_held() not have a return value
I recently made the mistake of writing:
foo = lockdep_dereference_protected(..., lockdep_assert_held(...));
which is clearly bogus. If lockdep is disabled in the config this would
cause a compile failure, if it is enabled then it compiles and causes a
puzzling warning about dereferencing without the correct protection.
Wrap the macro in "do { ... } while (0)" to also fail compile for this
when lockdep is enabled.
Signed-off-by: Johannes Berg <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions