提交 364f6afc 编写于 作者: B Bart Van Assche 提交者: Ingo Molnar

locking/lockdep: Make it clear that what lock_class::key points at is not modified

This patch does not change the behavior of the lockdep code.
Signed-off-by: NBart Van Assche <bvanassche@acm.org>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Link: https://lkml.kernel.org/r/20190722182443.216015-2-bvanassche@acm.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 6c11c6e3
...@@ -97,7 +97,7 @@ struct lock_class { ...@@ -97,7 +97,7 @@ struct lock_class {
*/ */
struct list_head locks_after, locks_before; struct list_head locks_after, locks_before;
struct lockdep_subclass_key *key; const struct lockdep_subclass_key *key;
unsigned int subclass; unsigned int subclass;
unsigned int dep_gen_id; unsigned int dep_gen_id;
......
...@@ -511,7 +511,7 @@ static const char *usage_str[] = ...@@ -511,7 +511,7 @@ static const char *usage_str[] =
}; };
#endif #endif
const char * __get_key_name(struct lockdep_subclass_key *key, char *str) const char *__get_key_name(const struct lockdep_subclass_key *key, char *str)
{ {
return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str); return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str);
} }
......
...@@ -116,7 +116,8 @@ extern struct lock_chain lock_chains[]; ...@@ -116,7 +116,8 @@ extern struct lock_chain lock_chains[];
extern void get_usage_chars(struct lock_class *class, extern void get_usage_chars(struct lock_class *class,
char usage[LOCK_USAGE_CHARS]); char usage[LOCK_USAGE_CHARS]);
extern const char * __get_key_name(struct lockdep_subclass_key *key, char *str); extern const char *__get_key_name(const struct lockdep_subclass_key *key,
char *str);
struct lock_class *lock_chain_get_class(struct lock_chain *chain, int i); struct lock_class *lock_chain_get_class(struct lock_chain *chain, int i);
......
...@@ -399,7 +399,7 @@ static void seq_lock_time(struct seq_file *m, struct lock_time *lt) ...@@ -399,7 +399,7 @@ static void seq_lock_time(struct seq_file *m, struct lock_time *lt)
static void seq_stats(struct seq_file *m, struct lock_stat_data *data) static void seq_stats(struct seq_file *m, struct lock_stat_data *data)
{ {
struct lockdep_subclass_key *ckey; const struct lockdep_subclass_key *ckey;
struct lock_class_stats *stats; struct lock_class_stats *stats;
struct lock_class *class; struct lock_class *class;
const char *cname; const char *cname;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册