Skip to content

Commit 2b62c2d

Browse files
committed
tools/liblockdep: explicitly declare lockdep API we call from liblockdep
It seems that newer gcc complains about lack of explicit declaration for some of the API we use, add it in. Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
1 parent e308e94 commit 2b62c2d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tools/lib/lockdep/include/liblockdep/common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
4343
struct lockdep_map *nest_lock, unsigned long ip);
4444
void lock_release(struct lockdep_map *lock, int nested,
4545
unsigned long ip);
46+
extern void debug_check_no_locks_freed(const void *from, unsigned long len);
47+
extern void lockdep_init(void);
4648

4749
#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
4850
{ .name = (_name), .key = (void *)(_key), }

tools/lib/lockdep/uinclude/linux/lockdep.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <string.h>
77
#include <limits.h>
88
#include <linux/utsname.h>
9-
9+
#include <linux/compiler.h>
1010

1111
#define MAX_LOCK_DEPTH 2000UL
1212

@@ -54,5 +54,6 @@ static struct new_utsname *init_utsname(void)
5454
#define static_obj(x) 1
5555

5656
#define debug_show_all_locks()
57+
extern void debug_check_no_locks_held(void);
5758

5859
#endif

0 commit comments

Comments
 (0)