mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
tools/lib/lockdep: Fix 'defined but not used' warning for init_utsname()
We define init_utsname() as static but not inline, resulting in a warning for every source file that includes lockdep.h but doesn't call it. Since it is only used by lockdep.c, define it in there. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
b016d870ca
commit
1baa75406e
2 changed files with 10 additions and 10 deletions
|
|
@ -12,4 +12,14 @@ u32 prandom_u32(void)
|
|||
abort();
|
||||
}
|
||||
|
||||
static struct new_utsname *init_utsname(void)
|
||||
{
|
||||
static struct new_utsname n = (struct new_utsname) {
|
||||
.release = "liblockdep",
|
||||
.version = LIBLOCKDEP_VERSION,
|
||||
};
|
||||
|
||||
return &n;
|
||||
}
|
||||
|
||||
#include "../../../kernel/locking/lockdep.c"
|
||||
|
|
|
|||
|
|
@ -44,16 +44,6 @@ static inline int debug_locks_off(void)
|
|||
#define atomic_t unsigned long
|
||||
#define atomic_inc(x) ((*(x))++)
|
||||
|
||||
static struct new_utsname *init_utsname(void)
|
||||
{
|
||||
static struct new_utsname n = (struct new_utsname) {
|
||||
.release = "liblockdep",
|
||||
.version = LIBLOCKDEP_VERSION,
|
||||
};
|
||||
|
||||
return &n;
|
||||
}
|
||||
|
||||
#define print_tainted() ""
|
||||
#define static_obj(x) 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue