Received: by 10.213.65.68 with SMTP id h4csp737404imn; Wed, 28 Mar 2018 11:49:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+WZdYalJyprmwpAqS/wh3nEmCci3njDTlFFXAXABACmQSrosY4+fI0ujD8ZCIdUF2RjgHT X-Received: by 2002:a17:902:5793:: with SMTP id l19-v6mr4872948pli.386.1522262962629; Wed, 28 Mar 2018 11:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522262962; cv=none; d=google.com; s=arc-20160816; b=KwNCTt3FuL1GR7+u96OD4/6jJPzcKMt990V52l3PksTHRyp5QoUtbCr/ULDbY/oS+r ewFJ4RgZi1U9kliJWqcrPN5bcuLq7QNNN8ic0azzJ2CLGj7htWL/RJ0A4xmeKGG5Lggf o1wjL0/UfVpLd+t23FO30RqP/FzVmIKKX8UVj108qrvQRLyC2hMTRuCWEe6IbE651p3U DmocNvp81tBNu1XWkxcKPxteARBEqcV9Q4JKO+uD+jEcXS/gLx85oHTkH0b2e+rwwib3 kAxcWmpu+rnIsiutdStjZcIVG949f6RXWkHscy6kfOu8bzWTbcezaTNVLmMbKFkr6Kdo 4VZw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=BEpUbNKSELMFs7Pshj9VIX2OYkpE3Tlg7vVhPZwJJeo=; b=PWOeUUh5OLuUfyZGv2/7DN7P8rUyWUMxFPfGlann8yt8fOM7w1fePm01+E8VGxHqdf AGpfARuw6Yyhq4R/1WfpgYS3Cr2kcooyYSnzJrY4DTASvbSP/DxQ90hft1cQLJn3Vbe9 w5Aggr1n6fGsxJo1zJ4j+zkH/kO/d2zOafuNRNNAd63yGYY5BWtRniC8PlrC2yyEjgkM E9IFgJpSs9el5+59vxOH1luSV88dSlIX2VwiKwTFttbR9I3rZ4KhJbQ6h61kQGe/Zq+N s2DxBG9a1Y70ErHGDhbi6aI18cFl/cWSjWaK7b6wmKiCdUpcpqr9s4aG5qs+ioQfpfYI mE4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=H6yE4R+1; 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 g61-v6si4137054plb.686.2018.03.28.11.49.08; Wed, 28 Mar 2018 11:49:22 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=H6yE4R+1; 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 S1752918AbeC1SsJ (ORCPT + 99 others); Wed, 28 Mar 2018 14:48:09 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36227 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbeC1SsI (ORCPT ); Wed, 28 Mar 2018 14:48:08 -0400 Received: by mail-wm0-f67.google.com with SMTP id x82so7196850wmg.1 for ; Wed, 28 Mar 2018 11:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BEpUbNKSELMFs7Pshj9VIX2OYkpE3Tlg7vVhPZwJJeo=; b=H6yE4R+1eC4kMb+RbB6cKT7gUtF2kSjneEwNUTHDUzs1hPxQM1jzFNC++afnH6fLnT HhR4O+3dygX5W6ks4voBCZStTEt/uAYH62KmtT8PxfBzoskfpN7qkL3VQ1BlwhBy00+w lzmW4Jm0WDtxOXEHWqhizU9U81yn8xGbr26UYnzLNnPTyoNqqEKvCtVkiJXMlquA1i8K p+hqIEZAqydbbOfHxt+IPgTbBkmdMUqdnbig7S7F/f9ptpf47uMByORYIq733G+eQ1C+ K9Gw3q8oG1NtnGsXcgT3wvuxo34PhlfKXCnwFDY6g+GZ64AqF+JVEAPXWthY9BWqxU0G xAow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BEpUbNKSELMFs7Pshj9VIX2OYkpE3Tlg7vVhPZwJJeo=; b=T/6tbwlUBjtymCP6KqOB12XvVOJ6i6yGouhVL9GhXtuPY3ef9e1oypUjsENxpMTjYq RBwlBR99F8+70UE/ftGz8V8yAJWbKY7QV/NYH2XnQTfO3IZCk3DHYfQOrwmvRQr6fPcK 0QRKGYRdrU5eUn1gF8ELAYCzSINozXdaii3tjRYIBkL1Nn/iYX0imKeDZR2xz+cNHPcX ZUFxsFhN2oK1oMUQqDSZPs8VPQlZX9r7yjyFyL5v6evnmQNeqB4QUO7jhexl0PZrMJDJ VhuUehSimUqKRCC7TyzPnp/bpU8RuGFYg/gi89MJYqzLBqTmOj0oudqEZvXXRDn6JVSx WNEA== X-Gm-Message-State: AElRT7FHexdxEiyyi90mOJCiip24ADHh2WJoL0JDioeQ/ZtHU/qyVadS 1MbX21Su1zE1Ih/15aLC2BQ= X-Received: by 10.28.105.135 with SMTP id z7mr3581173wmh.119.1522262886798; Wed, 28 Mar 2018 11:48:06 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id j3sm6293544wra.19.2018.03.28.11.48.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 11:48:06 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 065CA10C01BF; Wed, 28 Mar 2018 20:48:05 +0200 (CEST) From: Mathieu Malaterre To: Michael Ellerman Cc: LEROY Christophe , Mathieu Malaterre , Benjamin Herrenschmidt , Paul Mackerras , Matt Brown , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] powerpc/altivec: Add missing prototypes for altivec Date: Wed, 28 Mar 2018 20:47:33 +0200 Message-Id: <20180328184744.10650-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180322202007.23088-15-malat@debian.org> References: <20180322202007.23088-15-malat@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some functions prototypes were missing for the non-altivec code. Add the missing prototypes in a new header file, 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] The prototypes were already present in but this header file is meant to be included after . Trying to re-use directly would lead to warnings such as: arch/powerpc/include/asm/xor.h:39:15: error: variable ‘xor_block_altivec’ has initializer but incomplete type Trying to re-use after in xor_vmx_glue.c would in turn trigger the following warnings: include/asm-generic/xor.h:688:34: error: ‘xor_block_32regs’ defined but not used [-Werror=unused-variable] Signed-off-by: Mathieu Malaterre --- arch/powerpc/include/asm/xor.h | 12 +----------- arch/powerpc/include/asm/xor_altivec.h | 19 +++++++++++++++++++ arch/powerpc/lib/xor_vmx_glue.c | 1 + 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 arch/powerpc/include/asm/xor_altivec.h diff --git a/arch/powerpc/include/asm/xor.h b/arch/powerpc/include/asm/xor.h index a36c2069d8ed..7d6dc503349d 100644 --- a/arch/powerpc/include/asm/xor.h +++ b/arch/powerpc/include/asm/xor.h @@ -24,17 +24,7 @@ #include #include - -void xor_altivec_2(unsigned long bytes, unsigned long *v1_in, - unsigned long *v2_in); -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); +#include static struct xor_block_template xor_block_altivec = { .name = "altivec", diff --git a/arch/powerpc/include/asm/xor_altivec.h b/arch/powerpc/include/asm/xor_altivec.h new file mode 100644 index 000000000000..6ca923510b59 --- /dev/null +++ b/arch/powerpc/include/asm/xor_altivec.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_POWERPC_XOR_ALTIVEC_H +#define _ASM_POWERPC_XOR_ALTIVEC_H + +#ifdef CONFIG_ALTIVEC + +void xor_altivec_2(unsigned long bytes, unsigned long *v1_in, + unsigned long *v2_in); +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); + +#endif +#endif /* _ASM_POWERPC_XOR_ALTIVEC_H */ diff --git a/arch/powerpc/lib/xor_vmx_glue.c b/arch/powerpc/lib/xor_vmx_glue.c index 6521fe5e8cef..dab2b6bfcf36 100644 --- a/arch/powerpc/lib/xor_vmx_glue.c +++ b/arch/powerpc/lib/xor_vmx_glue.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "xor_vmx.h" void xor_altivec_2(unsigned long bytes, unsigned long *v1_in, -- 2.11.0