Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757084AbcLBEXB (ORCPT ); Thu, 1 Dec 2016 23:23:01 -0500 Received: from mail-ua0-f196.google.com ([209.85.217.196]:33225 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755026AbcLBEW7 (ORCPT ); Thu, 1 Dec 2016 23:22:59 -0500 MIME-Version: 1.0 In-Reply-To: <874m2n7yrf.fsf@concordia.ellerman.id.au> References: <1479704219-21403-1-git-send-email-yanjiang.jin@windriver.com> <874m2n7yrf.fsf@concordia.ellerman.id.au> From: Balbir Singh Date: Fri, 2 Dec 2016 15:22:39 +1100 Message-ID: Subject: Re: [PATCH] powerpc: cputime: fix a compile warning To: Michael Ellerman Cc: yanjiang.jin@windriver.com, Benjamin Herrenschmidt , Paul Mackerras , oss@buserror.net, jinyanjiang@gmail.com, "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 900 Lines: 23 On Fri, Dec 2, 2016 at 3:15 PM, Michael Ellerman wrote: > yanjiang.jin@windriver.com writes: > >> 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))) > > Given the name of the function is "cputime64 to clock_t", surely we > should be returning a clock_t ? Please fix it in cpuacct.c Also check out git commit 527b0a76f41d062381adbb55c8eb61e32cb0bfc9 sched/cpuacct: Avoid %lld seq_printf warning Balbir