linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: cputime: fix a compile warning
@ 2016-11-21  4:56 yanjiang.jin
  2016-11-30 14:40 ` Scott Wood
  2016-12-02  4:15 ` Michael Ellerman
  0 siblings, 2 replies; 9+ messages in thread
From: yanjiang.jin @ 2016-11-21  4:56 UTC (permalink / raw)
  To: benh, paulus, mpe, oss
  Cc: linuxppc-dev, yanjiang.jin, linux-kernel, jinyanjiang

From: Yanjiang Jin <yanjiang.jin@windriver.com>

This patch is to avoid the below warning:

kernel/sched/cpuacct.c:298:25: warning:
format '%lld' expects argument of type 'long long int',
but argument 4 has type 'long unsigned int' [-Wformat=]

Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
---
 arch/powerpc/include/asm/cputime.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h
index 4f60db0..4423e97 100644
--- a/arch/powerpc/include/asm/cputime.h
+++ b/arch/powerpc/include/asm/cputime.h
@@ -228,7 +228,8 @@ static inline cputime_t clock_t_to_cputime(const unsigned long clk)
 	return (__force cputime_t) ct;
 }
 
-#define cputime64_to_clock_t(ct)	cputime_to_clock_t((cputime_t)(ct))
+#define cputime64_to_clock_t(ct)	\
+	(__force u64)(cputime_to_clock_t((cputime_t)(ct)))
 
 /*
  * PPC64 uses PACA which is task independent for storing accounting data while
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-02 19:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21  4:56 [PATCH] powerpc: cputime: fix a compile warning yanjiang.jin
2016-11-30 14:40 ` Scott Wood
2016-12-01  5:04   ` yjin
2016-12-02  4:15 ` Michael Ellerman
2016-12-02  4:22   ` Balbir Singh
2016-12-02  4:35     ` yjin
2016-12-02  5:15       ` Pan Xinhui
2016-12-02  5:17         ` yjin
2016-12-02 19:54   ` Scott Wood

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).