Received: by 10.213.65.68 with SMTP id h4csp798344imn; Tue, 27 Mar 2018 08:59:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELtYDnyJvushmNIL0qE4IrP8rhLKvDX5097lpicEX6W97Xq8mF3eFVgFAAT3cpcww0M9x/wB X-Received: by 10.99.97.130 with SMTP id v124mr31670612pgb.351.1522166382765; Tue, 27 Mar 2018 08:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522166382; cv=none; d=google.com; s=arc-20160816; b=hPAryzv6lDzHx0feakEHGCEd/xoJjrPfBFeqHbFD5HBbMRDGtWTTpQz/CwKM0KwVu0 h5oyvi1cZ3fgiyOJah/z9CViv0MX7lA3ZoMW30VJoRWTD6Z+9u7cbaMFCOmFpdcQhzV2 pJvQ8pH40O10ePppVFCwTb2RsOQOWLwh+a5OxzAvvhwyrJUTVmzlEPck/2e3zOOIZv96 eFuwKAVuVLCHQggduo6T1mUrwKeifD3Qn9fAyZxP7WgVmdCITjoEqx7hJHq4B19iSrkf a2g/rUU8aTBpJQVQDyOYobqaVil9l1DgVuEDRlp6j+zPw0gcQPwL9woTC47l4AhMLJVq g3HQ== 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-disposition:mime-version:user-agent:in-reply-to:references :subject:cc:to:from:message-id:date:arc-authentication-results; bh=8Yyb+bFU5uOqOf8L56upDoSyCSHHaJXKRPqMztco5R4=; b=nCMUueqqC6Xt/Bq9/acyrLIS92r5ZKHh4sgkwJfHzoQGms2Qd8Xn3cDxJF6LzSDF1a 4GbLdNGHPFuGGV0izU/J/MlPC4UW+zefacz1TbD/9y7+7w3oWa3yQ6FdQ5FXwiUCwg1v VgXtHbgjOMvFPfTh7NLXCJoQzEKNTbF6bmOeqYAtYKIa5FaK5bc8Lr1Eg6i13XpBXd0F q2+tDwcupSspIC2qp/u798yMmForIwTR/cUkBYwApaZnF6dFww0W7NlG4s+txbAujIrm RTe/ItCA7JzQ5wWTjmyG6SDwg80m/9q7qo1U/+i+6jm/H0qTa5tId0DshGm4gvxe3OBQ 2ZCw== 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 r8si1042867pgq.593.2018.03.27.08.59.28; Tue, 27 Mar 2018 08:59:42 -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 S1752748AbeC0P6X convert rfc822-to-8bit (ORCPT + 99 others); Tue, 27 Mar 2018 11:58:23 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:46673 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486AbeC0P6W (ORCPT ); Tue, 27 Mar 2018 11:58:22 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 409bJM35mwz9ttKf; Tue, 27 Mar 2018 17:57:55 +0200 (CEST) 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 jlmzcJ6aOQwb; Tue, 27 Mar 2018 17:57:55 +0200 (CEST) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 409bJM2ZHSz9ttFS; Tue, 27 Mar 2018 17:57:55 +0200 (CEST) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 7155E88C; Tue, 27 Mar 2018 17:58:06 +0200 (CEST) Received: from 37-169-47-166.coucou-networks.fr (37-169-47-166.coucou-networks.fr [37.169.47.166]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Tue, 27 Mar 2018 17:58:06 +0200 Date: Tue, 27 Mar 2018 17:58:06 +0200 Message-ID: <20180327175806.Horde.f26UMak3wqEtNtiMmJy51w2@messagerie.si.c-s.fr> From: LEROY Christophe To: Mathieu Malaterre Cc: Michael Ellerman , LKML , kvm-ppc@vger.kernel.org, Paul Mackerras , linuxppc-dev Subject: Re: [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec References: <20180322202007.23088-1-malat@debian.org> <20180322202007.23088-15-malat@debian.org> <97df68d1-d4fe-bf8e-7852-9b418eec042f@c-s.fr> <20180324211020.Horde.kEO4b3mHPV88FKM0OiRT0Q1@messagerie.si.c-s.fr> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mathieu Malaterre a écrit : > Christophe, > > On Sat, Mar 24, 2018 at 9:10 PM, LEROY Christophe > wrote: >> Mathieu Malaterre a écrit : >> >> >>> On Fri, Mar 23, 2018 at 1:19 PM, christophe leroy >>> wrote: >>>> >>>> >>>> >>>> Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : >>>>> >>>>> >>>>> Some functions prototypes were missing for the non-altivec code. Add the >>>>> missing prototypes directly in xor_vmx, fix warnings treated as errors >>>>> with >>>>> W=1: >>>>> >>>>> arch/powerpc/lib/xor_vmx_glue.c:18:6: error: no previous prototype >>>>> for >>>>> ‘xor_altivec_2’ [-Werror=missing-prototypes] >>>>> arch/powerpc/lib/xor_vmx_glue.c:29:6: error: no previous prototype >>>>> for >>>>> ‘xor_altivec_3’ [-Werror=missing-prototypes] >>>>> arch/powerpc/lib/xor_vmx_glue.c:40:6: error: no previous prototype >>>>> for >>>>> ‘xor_altivec_4’ [-Werror=missing-prototypes] >>>>> arch/powerpc/lib/xor_vmx_glue.c:52:6: error: no previous prototype >>>>> for >>>>> ‘xor_altivec_5’ [-Werror=missing-prototypes] >>>>> >>>>> Signed-off-by: Mathieu Malaterre >>>>> --- >>>>> arch/powerpc/lib/xor_vmx.h | 14 ++++++++++++++ >>>>> 1 file changed, 14 insertions(+) >>>>> >>>>> diff --git a/arch/powerpc/lib/xor_vmx.h b/arch/powerpc/lib/xor_vmx.h >>>>> index 5c2b0839b179..2173e3c84151 100644 >>>>> --- a/arch/powerpc/lib/xor_vmx.h >>>>> +++ b/arch/powerpc/lib/xor_vmx.h >>>>> @@ -19,3 +19,17 @@ void __xor_altivec_4(unsigned long bytes, unsigned >>>>> long >>>>> *v1_in, >>>>> void __xor_altivec_5(unsigned long bytes, unsigned long *v1_in, >>>>> unsigned long *v2_in, unsigned long *v3_in, >>>>> unsigned long *v4_in, unsigned long >>>>> *v5_in); >>>>> + >>>>> +void xor_altivec_2(unsigned long bytes, unsigned long *v1_in, >>>>> + unsigned long *v2_in); >>>>> + >>>> >>>> >>>> >>>> Only used in one place, should be static instead of adding it in a .h >>>> >>>> Same for the other ones. >>> >>> >>> $ git grep xor_altivec_2 >>> [...] >>> arch/powerpc/lib/xor_vmx_glue.c:EXPORT_SYMBOL(xor_altivec_2); >>> >>> Are you sure I can change this function to static ? >> >> >> Yes you are right. But in fact those fonctions are already defined in >> asm/xor. h >> So you just need to add the missing #include > > I originally tried it, but this leads to: > > CC arch/powerpc/lib/xor_vmx_glue.o > In file included from arch/powerpc/lib/xor_vmx_glue.c:16:0: > ./arch/powerpc/include/asm/xor.h:39:15: error: variable > ‘xor_block_altivec’ has initializer but incomplete type > static struct xor_block_template xor_block_altivec = { > ^~~~~~~~~~~~~~~~~~ > ./arch/powerpc/include/asm/xor.h:40:2: error: unknown field ‘name’ > specified in initializer > .name = "altivec", > ^ > [...] > > The file (powerpc) is pretty much expected to be included > after . > > I did not want to tweak to test for #ifdef _XOR_H just before > > #ifdef _XOR_H > static struct xor_block_template xor_block_altivec = { > [...] > > since this seems like a hack to me. > > Is this ok to test for #ifdef _XOR_H in ? What about including linux/raid/xor.h in asm/xor.h ? Christophe > >> Christophe >> >> >>> >>>> Christophe >>>> >>>> >>>>> +void xor_altivec_3(unsigned long bytes, unsigned long *v1_in, >>>>> + unsigned long *v2_in, unsigned long >>>>> *v3_in); >>>>> + >>>>> +void xor_altivec_4(unsigned long bytes, unsigned long *v1_in, >>>>> + unsigned long *v2_in, unsigned long *v3_in, >>>>> + unsigned long *v4_in); >>>>> + >>>>> +void xor_altivec_5(unsigned long bytes, unsigned long *v1_in, >>>>> + unsigned long *v2_in, unsigned long *v3_in, >>>>> + unsigned long *v4_in, unsigned long >>>>> *v5_in); >>>>> >>>> >>>> --- >>>> L'absence de virus dans ce courrier électronique a été vérifiée par le >>>> logiciel antivirus Avast. >>>> https://www.avast.com/antivirus >>>> >> >>