From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: linux-next: sched tree build warning Date: Mon, 22 Dec 2008 07:47:10 +0100 Message-ID: <20081222064710.GB29160@elte.hu> References: <20081222152247.b934ed5b.sfr@canb.auug.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:35020 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682AbYLVGr2 (ORCPT ); Mon, 22 Dec 2008 01:47:28 -0500 Content-Disposition: inline In-Reply-To: <20081222152247.b934ed5b.sfr@canb.auug.org.au> Sender: linux-next-owner@vger.kernel.org List-ID: To: Stephen Rothwell Cc: Thomas Gleixner , "H. Peter Anvin" , linux-next@vger.kernel.org, Ken Chen * Stephen Rothwell wrote: > Hi all, > > Today's linux-next build (powerpc ppc64_defconfig) produced this new > warning: > > fs/proc/base.c: In function 'proc_pid_schedstat': > fs/proc/base.c:352: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u64' > > Introduced by commit 9c2c48020ec0dd6ecd27e5a1298f73b40d85a595 > ("schedstat: consolidate per-task cpu runtime stats"). that should be harmless - fix below. Given that all these warnings generated by asm-generic/int-l64.h are bogus, all the time - the right and clean fix is to change the architectures that use it (s390, mips, ia64, sparc, powerpc, alpha) to asm-generic/int-ll64.h. It will break nothing - there will only be a one-time conversion to avoid similar build warnings. Ingo -----------------> >>From 826e08b0157c0ce8a80dfe3c0a6c5a1540dd0b1d Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 22 Dec 2008 07:37:41 +0100 Subject: [PATCH] sched: fix warning in fs/proc/base.c Stephen Rothwell reported this new (harmless) build warning on platforms that define u64 to long: fs/proc/base.c: In function 'proc_pid_schedstat': fs/proc/base.c:352: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u64' asm-generic/int-l64.h platforms strike again: that file should be eliminated. Fix it by casting the parameters to long long. Reported-by: Stephen Rothwell Signed-off-by: Ingo Molnar --- fs/proc/base.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 4d745ba..a48200c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -347,8 +347,8 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer) static int proc_pid_schedstat(struct task_struct *task, char *buffer) { return sprintf(buffer, "%llu %llu %lu\n", - task->se.sum_exec_runtime, - task->sched_info.run_delay, + (unsigned long long)task->se.sum_exec_runtime, + (unsigned long long)task->sched_info.run_delay, task->sched_info.pcount); } #endif