diff options
author | Kenny Yu <kennyyu@fb.com> | 2016-06-21 11:55:35 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-06-21 15:03:36 -0400 |
commit | 9f6870dd9790dd87da1d0cf9e43e60113f3a278d (patch) | |
tree | a2d81063b5e6bff867fc49db5702de4e3c9e7839 /kernel/cgroup_pids.c | |
parent | 135b8b37bd91cc82f83e98fca109b80375f5317e (diff) | |
download | linux-9f6870dd9790dd87da1d0cf9e43e60113f3a278d.tar.bz2 |
cgroup: Use lld instead of ld when printing pids controller events_limit
The `events_limit` variable needs to be formatted with %lld and not %ld.
This fixes the following warning discovered by kbuild test robot:
kernel/cgroup_pids.c: In function 'pids_events_show':
kernel/cgroup_pids.c:313:24: warning: format '%ld' expects argument of type
'long int', but argument 3 has type 'long long int' [-Wformat=]
seq_printf(sf, "max %ld\n", atomic64_read(&pids->events_limit));
^
tj: Added explicit (s64) cast as atomic64 switches between long long
and long depending on 32 or 64.
Signed-off-by: Kenny Yu <kennyyu@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup_pids.c')
-rw-r--r-- | kernel/cgroup_pids.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup_pids.c b/kernel/cgroup_pids.c index 9740ea6762de..2bd673783f1a 100644 --- a/kernel/cgroup_pids.c +++ b/kernel/cgroup_pids.c @@ -310,7 +310,7 @@ static int pids_events_show(struct seq_file *sf, void *v) { struct pids_cgroup *pids = css_pids(seq_css(sf)); - seq_printf(sf, "max %ld\n", atomic64_read(&pids->events_limit)); + seq_printf(sf, "max %lld\n", (s64)atomic64_read(&pids->events_limit)); return 0; } |