diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-01-25 09:14:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-01-25 09:23:15 -0500 |
commit | cff3c124a7e82ca0ea1d6864b27ef18c403c0773 (patch) | |
tree | 1edf50c211024b6ec2dc34dd592cbe2e4c9f5f81 /kernel | |
parent | 38dc3348e36d6cbe6ad51d771e4db948cda5b0e3 (diff) |
sched/debug: Fix format string for 32-bit platforms
The type returned from atomic64_t can be either unsigned
long or unsigned long long, depending on the architecture.
Using a cast to unsigned long long lets us use the same
format string for all architectures.
Without this patch, building with scheduler debugging
enabled results in:
kernel/sched/debug.c: In function 'print_cfs_rq':
kernel/sched/debug.c:225:2: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'long long int' [-Wformat]
kernel/sched/debug.c:225:2: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'long long int' [-Wformat]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Turner <pjt@google.com>
Cc: linux-arm-kernel@list.infradead.org
Link: http://lkml.kernel.org/r/1359123276-15833-7-git-send-email-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 2cd3c1b4e582..7ae4c4c5420e 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c | |||
@@ -222,8 +222,8 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
222 | cfs_rq->runnable_load_avg); | 222 | cfs_rq->runnable_load_avg); |
223 | SEQ_printf(m, " .%-30s: %lld\n", "blocked_load_avg", | 223 | SEQ_printf(m, " .%-30s: %lld\n", "blocked_load_avg", |
224 | cfs_rq->blocked_load_avg); | 224 | cfs_rq->blocked_load_avg); |
225 | SEQ_printf(m, " .%-30s: %ld\n", "tg_load_avg", | 225 | SEQ_printf(m, " .%-30s: %lld\n", "tg_load_avg", |
226 | atomic64_read(&cfs_rq->tg->load_avg)); | 226 | (unsigned long long)atomic64_read(&cfs_rq->tg->load_avg)); |
227 | SEQ_printf(m, " .%-30s: %lld\n", "tg_load_contrib", | 227 | SEQ_printf(m, " .%-30s: %lld\n", "tg_load_contrib", |
228 | cfs_rq->tg_load_contrib); | 228 | cfs_rq->tg_load_contrib); |
229 | SEQ_printf(m, " .%-30s: %d\n", "tg_runnable_contrib", | 229 | SEQ_printf(m, " .%-30s: %d\n", "tg_runnable_contrib", |