diff options
author | Fuqian Huang <huangfq.daxian@gmail.com> | 2019-04-21 07:47:27 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-05-06 11:47:48 -0400 |
commit | 1900da520c9fdc3a7cf00d21638f7c8721d5ac7f (patch) | |
tree | 56a97c94e8635113c43e7062b85618276885d80b /kernel/cgroup/debug.c | |
parent | 96b9c592def5d7203bdad1337d9c92a2183de5cb (diff) |
kernel: cgroup: fix misuse of %x
Pointers should be printed with %p or %px rather than
cast to unsigned long type and printed with %lx.
Change %lx to %p to print the pointers.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup/debug.c')
-rw-r--r-- | kernel/cgroup/debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/cgroup/debug.c b/kernel/cgroup/debug.c index 5f1b87330bee..80aa3f027ac3 100644 --- a/kernel/cgroup/debug.c +++ b/kernel/cgroup/debug.c | |||
@@ -64,8 +64,8 @@ static int current_css_set_read(struct seq_file *seq, void *v) | |||
64 | css = cset->subsys[ss->id]; | 64 | css = cset->subsys[ss->id]; |
65 | if (!css) | 65 | if (!css) |
66 | continue; | 66 | continue; |
67 | seq_printf(seq, "%2d: %-4s\t- %lx[%d]\n", ss->id, ss->name, | 67 | seq_printf(seq, "%2d: %-4s\t- %p[%d]\n", ss->id, ss->name, |
68 | (unsigned long)css, css->id); | 68 | css, css->id); |
69 | } | 69 | } |
70 | rcu_read_unlock(); | 70 | rcu_read_unlock(); |
71 | spin_unlock_irq(&css_set_lock); | 71 | spin_unlock_irq(&css_set_lock); |
@@ -224,8 +224,8 @@ static int cgroup_subsys_states_read(struct seq_file *seq, void *v) | |||
224 | if (css->parent) | 224 | if (css->parent) |
225 | snprintf(pbuf, sizeof(pbuf) - 1, " P=%d", | 225 | snprintf(pbuf, sizeof(pbuf) - 1, " P=%d", |
226 | css->parent->id); | 226 | css->parent->id); |
227 | seq_printf(seq, "%2d: %-4s\t- %lx[%d] %d%s\n", ss->id, ss->name, | 227 | seq_printf(seq, "%2d: %-4s\t- %p[%d] %d%s\n", ss->id, ss->name, |
228 | (unsigned long)css, css->id, | 228 | css, css->id, |
229 | atomic_read(&css->online_cnt), pbuf); | 229 | atomic_read(&css->online_cnt), pbuf); |
230 | } | 230 | } |
231 | 231 | ||