* [PATCH] tools/liblockdep: Fix compilation error.
@ 2015-04-21 7:00 Eunbong Song
2015-04-21 12:20 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Eunbong Song @ 2015-04-21 7:00 UTC (permalink / raw)
To: sasha.levin; +Cc: linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 2848 bytes --]
Currently, liblockdep has compilation error with following log messages.
CC common.o
CC lockdep.o
In file included from lockdep.c:10:
../../../kernel/locking/lockdep.c: In function 'count_matching_names':
../../../kernel/locking/lockdep.c:650: error: 'lock_entry' undeclared (first use in this function)
../../../kernel/locking/lockdep.c:650: error: (Each undeclared identifier is reported only once
../../../kernel/locking/lockdep.c:650: error: for each function it appears in.)
../../../kernel/locking/lockdep.c:650: error: expected ';' before '{' token
../../../kernel/locking/lockdep.c: In function 'look_up_lock_class':
../../../kernel/locking/lockdep.c:722: error: 'hash_entry' undeclared (first use in this function)
../../../kernel/locking/lockdep.c:722: error: expected ';' before '{' token
../../../kernel/locking/lockdep.c: In function 'register_lock_class':
../../../kernel/locking/lockdep.c:777: error: 'hash_entry' undeclared (first use in this function)
../../../kernel/locking/lockdep.c:777: error: expected ';' before '{' token
../../../kernel/locking/lockdep.c: In function '__bfs':
../../../kernel/locking/lockdep.c:1039: error: expected ';' before '{' token
../../../kernel/locking/lockdep.c: In function 'lookup_chain_cache':
../../../kernel/locking/lockdep.c:2036: error: 'entry' undeclared (first use in this function)
../../../kernel/locking/lockdep.c:2036: error: expected ';' before '{' token
../../../kernel/locking/lockdep.c:2063: error: label 'cache_hit' used but not defined
In file included from lockdep.c:10:
../../../kernel/locking/lockdep.c: In function 'lockdep_free_key_range':
../../../kernel/locking/lockdep.c:3937: error: 'hash_entry' undeclared (first use in this function)
../../../kernel/locking/lockdep.c:3937: error: expected ';' before '{' token
../../../kernel/locking/lockdep.c: In function 'lockdep_reset_lock':
../../../kernel/locking/lockdep.c:3994: error: 'hash_entry' undeclared (first use in this function)
../../../kernel/locking/lockdep.c:3994: error: expected ';' before '{' token
This patch fixes this compilation error.
Signed-off-by: Eunbong Song <eunb.song@samsung.com>
---
tools/lib/lockdep/lockdep.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c
index f42b7e9..f83a988 100644
--- a/tools/lib/lockdep/lockdep.c
+++ b/tools/lib/lockdep/lockdep.c
@@ -1,2 +1,8 @@
#include <linux/lockdep.h>
+
+#ifdef list_for_each_entry_rcu
+#undef list_for_each_entry_rcu
+#endif
+#define list_for_each_entry_rcu(pos, head, member) list_for_each_entry(pos, head, member)
+
#include "../../../kernel/locking/lockdep.c"
--
1.7.0.1
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/liblockdep: Fix compilation error.
2015-04-21 7:00 [PATCH] tools/liblockdep: Fix compilation error Eunbong Song
@ 2015-04-21 12:20 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2015-04-21 12:20 UTC (permalink / raw)
To: eunb.song; +Cc: linux-kernel
On 04/21/2015 03:00 AM, Eunbong Song wrote:
> diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c
> index f42b7e9..f83a988 100644
> --- a/tools/lib/lockdep/lockdep.c
> +++ b/tools/lib/lockdep/lockdep.c
> @@ -1,2 +1,8 @@
> #include <linux/lockdep.h>
> +
> +#ifdef list_for_each_entry_rcu
> +#undef list_for_each_entry_rcu
> +#endif
> +#define list_for_each_entry_rcu(pos, head, member) list_for_each_entry(pos, head, member)
> +
> #include "../../../kernel/locking/lockdep.c"
I'd rather have it pull include/linux/rculist.h and "fix" it up for userspace like we did for the
rest of the headers rather than start adding exceptions in the main program code.
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-21 12:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 7:00 [PATCH] tools/liblockdep: Fix compilation error Eunbong Song
2015-04-21 12:20 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox