Received: by 10.213.65.68 with SMTP id h4csp886503imn; Tue, 27 Mar 2018 10:35:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bLBw6KGGmRRyovXXf4U4sknwd+8ljsIkODfzi6xKCfA5lJJ28Kj9D4cVxdBs8tkHGbhDI X-Received: by 10.98.236.86 with SMTP id k83mr207413pfh.84.1522172135833; Tue, 27 Mar 2018 10:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522172135; cv=none; d=google.com; s=arc-20160816; b=yEAVQzxrgizl5SrhOV6UH6jwW+A0JhHxVnQ9AkuOqaQd+PtT3+AzJuQ93juKXZUqpR y4hc80gVfV5lC42AV1WXffEbgZ/YMEY76ajk+QMum79VcLHewYVQgp3pOmtG0WpMGNDJ 8LQaZZKidRZej7gIPf7Wa08PcfZRzi+k5NsZrlAyJaH2vRJVEA1K38iZEwHvsqYxvSIk Xm+dJKHBI8DDgw5ZMB1ro6Lc3RVv/GlxT1zsxswCbvNhsenhzYvqhbMh3jSBifeCs689 WIzxk1x0i0FuJcFrdvsu4PO0xzL5g8JwskH4N+vUb0Hl3Kf7wP9JEoy4Jo/uzTPjw1hm LTPw== 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=hLBC8YYaLsmx4A91aP7BGX0Ay7mZMjop8cwki0GUokc=; b=NN7QImfWRvVg/A56W5i3xeB4qpUZ0XVcycrYT6i9jtpB9VvsYlPJHc8pcKYx/D0acp yhGnGCJl9wqtq1dEB5lLMNnlC8p9j61Fmhs9Dhd2VykL9QpPk+aA2p4YYSm1rB0vDK43 NWPtQOkwSXMJyhc1BH1HoJz27BDx3nlxW4HXPD5PC/WNA/niUjX3RDGV0+Sp857/eUky IE6GJSlElMBpAaiY+pTkri/5mpGGwOPSXtrNt7U7um23qG22AuLpsSnKIFLIkcuZIAyJ JbY/fHVxnYwOkwaYy3DPbe8mGLpwkazx34ngq8X9jVM0DC9BCk0AWGSEm3jUZOJ1rPKw Nbtg== 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 l13si1132175pgn.346.2018.03.27.10.35.21; Tue, 27 Mar 2018 10:35:35 -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 S1754615AbeC0Rdm convert rfc822-to-8bit (ORCPT + 99 others); Tue, 27 Mar 2018 13:33:42 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:36292 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751167AbeC0Rdj (ORCPT ); Tue, 27 Mar 2018 13:33:39 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 409dQJ3kcjz9ttSB; Tue, 27 Mar 2018 19:33:12 +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 LGGQvbrJcLob; Tue, 27 Mar 2018 19:33:12 +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 409dQJ2xk0z9ttRs; Tue, 27 Mar 2018 19:33:12 +0200 (CEST) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 8B1628E9; Tue, 27 Mar 2018 19:33:23 +0200 (CEST) Received: from 37-173-85-38.coucou-networks.fr (37-173-85-38.coucou-networks.fr [37.173.85.38]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Tue, 27 Mar 2018 19:33:23 +0200 Date: Tue, 27 Mar 2018 19:33:23 +0200 Message-ID: <20180327193323.Horde.S-Hqc40p7JjEsZPPEa3YNg1@messagerie.si.c-s.fr> From: LEROY Christophe To: Mathieu Malaterre Cc: kvm-ppc@vger.kernel.org, LKML , 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> <20180327175806.Horde.f26UMak3wqEtNtiMmJy51w2@messagerie.si.c-s.fr> In-Reply-To: <20180327175806.Horde.f26UMak3wqEtNtiMmJy51w2@messagerie.si.c-s.fr> 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 LEROY Christophe a écrit : > 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 ? Or better: including linux/raid/xor.h then asm/xor.h in xor_vmx_glue.c ? Christophe > > 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 >>>>> >>> >>>