Received: by 10.213.65.68 with SMTP id h4csp315415imn; Fri, 23 Mar 2018 05:23:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELsmBF7Ewn0wtxCiGO1BrjDYq7CxAndUJfHk60BePrvj+5t59T+0HvtCmBmpDX86gTmuGIrd X-Received: by 10.98.106.193 with SMTP id f184mr12240878pfc.201.1521807825307; Fri, 23 Mar 2018 05:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521807825; cv=none; d=google.com; s=arc-20160816; b=JU74AB88SZPbj1KdnRqdWfCduh2lttOguNFsXrItSsBeLmQ9XGOlA/6nD9K7H2yk1/ k0eEXHpzmbaTVnCGbItk4hDAt/yugXxiDzmsLNmIRx95W4shdNLZmXnIYUb2qTRGMfF8 ej32NeMBH4P2lE2gtKfAzLxcIArt3lzFn2UfUuKRwjT5UISGdZoSu5cnmhJA/8aqYLRO Qb3ny0y8RKaCWplK5E8oudF+6u+1kRWwZmkJmGWYgwgsiNLFngX6BsUpHpqyaj+42di5 CJaeA+4fy4a//217pWuZeUoc/ZQXWSY4MbFrC3rvatsd2Gf/jqN/A5w6/KewUQgx0Hu9 1UCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=aorHaRuaFOL7VbtqCm7H9BQViR501pthIQT/tcXI1SE=; b=TRixmnBbH8udf+82+k4ZmrBAJIpUYgpQJEKtlerxROAvEMQ/PZM9nfb5ZnTmdYMie6 GpiHD7AIGJHrX/l26nHToJ7csN0dtS73n4A6Sq5WK1YFvxkQfSYVhAH6n2YCNiP7Iz9v /A79PQgIsfrYKhNWFFou4ZOAuEZTXameKXR8mBlNzMB0dZY+v0tWBlFyk7uWf9l+55Cj +h8nH1MSzoGXyPsKwMtjYI5T6qpQeWspvpLniJXR4RtQhqZi24eTReZqssc1ibRTfSst 6rtAajDLZBhvcsgSguEXiLZIe4r5iLeZ9/2teQBm2m29JYYq1OD5rRanBQiy7Ug73Pnd I7Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si5872181pgc.601.2018.03.23.05.23.29; Fri, 23 Mar 2018 05:23:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752367AbeCWMWj (ORCPT + 99 others); Fri, 23 Mar 2018 08:22:39 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:36914 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595AbeCWMWh (ORCPT ); Fri, 23 Mar 2018 08:22:37 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4072jT0Y5kz9v0Wj; Fri, 23 Mar 2018 13:22:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id TOZXolFXwT5A; Fri, 23 Mar 2018 13:22:21 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4072jS6tK5z9ttBp; Fri, 23 Mar 2018 13:22:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C15AD8B8EB; Fri, 23 Mar 2018 13:22:35 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 5P37G1iJAxAU; Fri, 23 Mar 2018 13:22:35 +0100 (CET) Received: from [192.168.232.53] (unknown [192.168.232.53]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D1AD08B8EA; Fri, 23 Mar 2018 13:22:34 +0100 (CET) Subject: Re: [PATCH 19/19] powerpc/tau: Synchronize function prototypes and body To: Mathieu Malaterre , Michael Ellerman Cc: linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org References: <20180322202007.23088-1-malat@debian.org> <20180322202007.23088-20-malat@debian.org> From: christophe leroy Message-ID: Date: Fri, 23 Mar 2018 13:22:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180322202007.23088-20-malat@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Antivirus: Avast (VPS 180322-6, 22/03/2018), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : > Some function prototypes and body for Thermal Assist Units were not in > sync. Update the function definition to match the existing function > declaration found in `setup-common.c`, changing an `int` return type to a > `u32` return type. Move the prototypes to a header file. Fix the following > warnings, treated as error with W=1: > > arch/powerpc/kernel/tau_6xx.c:257:5: error: no previous prototype for ‘cpu_temp_both’ [-Werror=missing-prototypes] > arch/powerpc/kernel/tau_6xx.c:262:5: error: no previous prototype for ‘cpu_temp’ [-Werror=missing-prototypes] > arch/powerpc/kernel/tau_6xx.c:267:5: error: no previous prototype for ‘tau_interrupts’ [-Werror=missing-prototypes] > > Compile tested with CONFIG_TAU_INT. > > Signed-off-by: Mathieu Malaterre > --- > arch/powerpc/kernel/irq.c | 2 +- > arch/powerpc/kernel/setup-common.c | 6 ------ > arch/powerpc/kernel/setup.h | 6 ++++++ > arch/powerpc/kernel/tau_6xx.c | 7 +++++-- > 4 files changed, 12 insertions(+), 9 deletions(-) > > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c > index f88038847790..3777b6e09142 100644 > --- a/arch/powerpc/kernel/irq.c > +++ b/arch/powerpc/kernel/irq.c > @@ -89,7 +89,7 @@ atomic_t ppc_n_lost_interrupts; > > #ifdef CONFIG_TAU_INT > extern int tau_initialized; > -extern int tau_interrupts(int); > +extern u32 tau_interrupts(unsigned long cpu); > #endif > #endif /* CONFIG_PPC32 */ > > diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c > index d73ec518ef80..bd3675c3984b 100644 > --- a/arch/powerpc/kernel/setup-common.c > +++ b/arch/powerpc/kernel/setup-common.c > @@ -192,12 +192,6 @@ void machine_halt(void) > machine_hang(); > } > > - > -#ifdef CONFIG_TAU > -extern u32 cpu_temp(unsigned long cpu); > -extern u32 cpu_temp_both(unsigned long cpu); > -#endif /* CONFIG_TAU */ > - > #ifdef CONFIG_SMP > DEFINE_PER_CPU(unsigned int, cpu_pvr); > #endif > diff --git a/arch/powerpc/kernel/setup.h b/arch/powerpc/kernel/setup.h > index d768023a04bd..3c9c19430439 100644 > --- a/arch/powerpc/kernel/setup.h > +++ b/arch/powerpc/kernel/setup.h > @@ -70,4 +70,10 @@ void kvm_cma_reserve(void); > static inline void kvm_cma_reserve(void) { }; > #endif > > +#ifdef CONFIG_TAU > +extern u32 cpu_temp(unsigned long cpu); > +extern u32 cpu_temp_both(unsigned long cpu); > +extern u32 tau_interrupts(unsigned long cpu); extern keyword is not needed Christophe > +#endif /* CONFIG_TAU */ > + > #endif /* __ARCH_POWERPC_KERNEL_SETUP_H */ > diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c > index 1fc6a89a978e..e2ab8a111b69 100644 > --- a/arch/powerpc/kernel/tau_6xx.c > +++ b/arch/powerpc/kernel/tau_6xx.c > @@ -27,6 +27,9 @@ > #include > #include > #include > +#include > + > +#include "setup.h" > > static struct tau_temp > { > @@ -259,12 +262,12 @@ u32 cpu_temp_both(unsigned long cpu) > return ((tau[cpu].high << 16) | tau[cpu].low); > } > > -int cpu_temp(unsigned long cpu) > +u32 cpu_temp(unsigned long cpu) > { > return ((tau[cpu].high + tau[cpu].low) / 2); > } > > -int tau_interrupts(unsigned long cpu) > +u32 tau_interrupts(unsigned long cpu) > { > return (tau[cpu].interrupts); > } > --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus