diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-11-11 08:19:37 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-11-11 08:19:37 +0100 |
commit | efc96737bd82b508794d2b28061a12af4a3f7766 (patch) | |
tree | e9fe4982967b74c0d25a35a2d7f7c62d8be98a47 /kernel/lockdep.c | |
parent | 1ec454baf1245df4fdb5dae728da3363630ce6de (diff) | |
parent | 7e9a49ef542610609144d1afcd516dc3fafac4d6 (diff) |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index e69434b070d..d2fab46a1c9 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -498,36 +498,32 @@ void get_usage_chars(struct lock_class *class, char usage[LOCK_USAGE_CHARS]) usage[i] = '\0'; } -static int __print_lock_name(struct lock_class *class) +static void __print_lock_name(struct lock_class *class) { char str[KSYM_NAME_LEN]; const char *name; name = class->name; - if (!name) - name = __get_key_name(class->key, str); - - return printk("%s", name); -} - -static void print_lock_name(struct lock_class *class) -{ - char str[KSYM_NAME_LEN], usage[LOCK_USAGE_CHARS]; - const char *name; - - get_usage_chars(class, usage); - - name = class->name; if (!name) { name = __get_key_name(class->key, str); - printk(" (%s", name); + printk("%s", name); } else { - printk(" (%s", name); + printk("%s", name); if (class->name_version > 1) printk("#%d", class->name_version); if (class->subclass) printk("/%d", class->subclass); } +} + +static void print_lock_name(struct lock_class *class) +{ + char usage[LOCK_USAGE_CHARS]; + + get_usage_chars(class, usage); + + printk(" ("); + __print_lock_name(class); printk("){%s}", usage); } |