Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526358 > unrolled thread

[PATCH] powerpc: cputime: fix a compile warning

Started by<yanjiang.jin@windriver.com>
First post2016-11-21 06:00 +0100
Last post2016-11-21 06:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] powerpc: cputime: fix a compile warning <yanjiang.jin@windriver.com> - 2016-11-21 06:00 +0100

#1526358 — [PATCH] powerpc: cputime: fix a compile warning

From<yanjiang.jin@windriver.com>
Date2016-11-21 06:00 +0100
Subject[PATCH] powerpc: cputime: fix a compile warning
Message-ID<sFORX-4Q0-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web