linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-next@vger.kernel.org, Ken Chen <kenchen@google.com>
Subject: Re: linux-next: sched tree build warning
Date: Mon, 22 Dec 2008 07:47:10 +0100	[thread overview]
Message-ID: <20081222064710.GB29160@elte.hu> (raw)
In-Reply-To: <20081222152247.b934ed5b.sfr@canb.auug.org.au>


* Stephen Rothwell <sfr@canb.auug.org.au> 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 <mingo@elte.hu>
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 <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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

  reply	other threads:[~2008-12-22  6:47 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-22  4:22 linux-next: sched tree build warning Stephen Rothwell
2008-12-22  6:47 ` Ingo Molnar [this message]
2008-12-22  6:49 ` Ken Chen
2008-12-22  7:04   ` Ingo Molnar
2008-12-22  7:19     ` Stephen Rothwell
2008-12-22  8:03       ` [patch] powerpc: change u64/s64 to a long long integer type Ingo Molnar
2008-12-22 22:43         ` Andrew Morton
2008-12-22 23:00           ` Sam Ravnborg
2008-12-22 23:03             ` H. Peter Anvin
2008-12-22 23:13               ` Sam Ravnborg
2008-12-22 23:13             ` Andrew Morton
2008-12-23 13:17               ` [PATCH] sparc64: use unsigned long long for u64 Sam Ravnborg
2008-12-23 14:42                 ` [PATCH] sparc64: fix unsigned long long warnings in drivers Sam Ravnborg
2008-12-23 17:05                 ` [PATCH] sparc64: use unsigned long long for u64 Ken Chen
2008-12-23 17:26                   ` Sam Ravnborg
2008-12-23 17:29                     ` Ken Chen
2008-12-23 17:34                       ` Sam Ravnborg
2008-12-27  8:54                 ` David Miller
2008-12-27  9:24                   ` Sam Ravnborg
2008-12-27  9:37                     ` David Miller
2008-12-27  9:49                       ` Sam Ravnborg
2008-12-28  4:25                         ` David Miller
2008-12-28 12:32                           ` Sam Ravnborg
2008-12-31  4:40         ` [patch] powerpc: change u64/s64 to a long long integer type Stephen Rothwell
2008-12-31  7:52           ` Ingo Molnar
2008-12-22  8:14     ` linux-next: sched tree build warning Paul Mackerras
2008-12-22  8:18       ` Ingo Molnar
2008-12-22  9:44         ` Paul Mackerras
2008-12-22 10:53           ` Ingo Molnar
2008-12-22 12:03             ` Paul Mackerras
  -- strict thread matches above, loose matches on Subject: below --
2009-04-21  0:27 Stephen Rothwell
2009-04-21  3:10 ` Gautham R Shenoy
2009-04-21  3:28   ` Stephen Rothwell
2009-04-21  6:09   ` Ingo Molnar
2009-04-21  6:21 ` Rusty Russell
2009-05-07  1:21 Stephen Rothwell
2009-05-07  6:45 ` David Rientjes
2009-05-07  7:39   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081222064710.GB29160@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=kenchen@google.com \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).