* [PATCH v2 02/06] kernel: cgroup: fix misuse of %x
@ 2019-04-21 11:47 ` Fuqian Huang
0 siblings, 0 replies; 3+ messages in thread
From: Fuqian Huang @ 2019-04-21 11:47 UTC (permalink / raw)
Cc: Fuqian Huang, Tejun Heo, Li Zefan, Johannes Weiner, cgroups,
linux-kernel
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>
---
kernel/cgroup/debug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/cgroup/debug.c b/kernel/cgroup/debug.c
index 5f1b873..80aa3f0 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)
css = cset->subsys[ss->id];
if (!css)
continue;
- seq_printf(seq, "%2d: %-4s\t- %lx[%d]\n", ss->id, ss->name,
- (unsigned long)css, css->id);
+ seq_printf(seq, "%2d: %-4s\t- %p[%d]\n", ss->id, ss->name,
+ css, css->id);
}
rcu_read_unlock();
spin_unlock_irq(&css_set_lock);
@@ -224,8 +224,8 @@ static int cgroup_subsys_states_read(struct seq_file *seq, void *v)
if (css->parent)
snprintf(pbuf, sizeof(pbuf) - 1, " P=%d",
css->parent->id);
- seq_printf(seq, "%2d: %-4s\t- %lx[%d] %d%s\n", ss->id, ss->name,
- (unsigned long)css, css->id,
+ seq_printf(seq, "%2d: %-4s\t- %p[%d] %d%s\n", ss->id, ss->name,
+ css, css->id,
atomic_read(&css->online_cnt), pbuf);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 02/06] kernel: cgroup: fix misuse of %x
@ 2019-04-21 11:47 ` Fuqian Huang
0 siblings, 0 replies; 3+ messages in thread
From: Fuqian Huang @ 2019-04-21 11:47 UTC (permalink / raw)
Cc: Fuqian Huang, Tejun Heo, Li Zefan, Johannes Weiner, cgroups,
linux-kernel
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>
---
kernel/cgroup/debug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/cgroup/debug.c b/kernel/cgroup/debug.c
index 5f1b873..80aa3f0 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)
css = cset->subsys[ss->id];
if (!css)
continue;
- seq_printf(seq, "%2d: %-4s\t- %lx[%d]\n", ss->id, ss->name,
- (unsigned long)css, css->id);
+ seq_printf(seq, "%2d: %-4s\t- %p[%d]\n", ss->id, ss->name,
+ css, css->id);
}
rcu_read_unlock();
spin_unlock_irq(&css_set_lock);
@@ -224,8 +224,8 @@ static int cgroup_subsys_states_read(struct seq_file *seq, void *v)
if (css->parent)
snprintf(pbuf, sizeof(pbuf) - 1, " P=%d",
css->parent->id);
- seq_printf(seq, "%2d: %-4s\t- %lx[%d] %d%s\n", ss->id, ss->name,
- (unsigned long)css, css->id,
+ seq_printf(seq, "%2d: %-4s\t- %p[%d] %d%s\n", ss->id, ss->name,
+ css, css->id,
atomic_read(&css->online_cnt), pbuf);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 02/06] kernel: cgroup: fix misuse of %x
2019-04-21 11:47 ` Fuqian Huang
(?)
@ 2019-05-06 15:48 ` Tejun Heo
-1 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2019-05-06 15:48 UTC (permalink / raw)
To: Fuqian Huang; +Cc: Li Zefan, Johannes Weiner, cgroups, linux-kernel
On Sun, Apr 21, 2019 at 07:47:27PM +0800, Fuqian Huang wrote:
> 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>
Applied to cgroup/for-5.2.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-06 15:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21 11:47 [PATCH v2 02/06] kernel: cgroup: fix misuse of %x Fuqian Huang
2019-04-21 11:47 ` Fuqian Huang
2019-05-06 15:48 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.