From patchwork Sun Sep 16 04:38:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10601663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F14C15A6 for ; Sun, 16 Sep 2018 04:39:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 309332A337 for ; Sun, 16 Sep 2018 04:39:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24E522A33C; Sun, 16 Sep 2018 04:39:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 72B782A337 for ; Sun, 16 Sep 2018 04:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PwaljaHmCOfywwnEv1yiXVNBsPa38SRN031swj+rO1c=; b=jSBaJfALioNTCm vHSwkqwSxZ4z4dRiWFzPzR/x/i+1xAVXkjCMOpSqPp1B75+jpaDHDXLg77BauowIYkF6CvkzAZuYm v6SroI+7LkQq1RNAQUCUBASMn7i52WikFvfo310FNt2yp49Edss3Ukej1cEwzxuViSvRglR1v4Bi/ 8iNwIZUlCnLhMkJrcTwECP1o+5sW0LQ2ftxlB48Uxqz9SF2s/XAPhRkqA6fNDxtsbqlKY5NX2HzG/ TjJ8azD2Hn9DSb05bc4e6sydxEs/DFNU0VyWXK/f6WVKU6VcVJ2RTF4Gb/d5u9ai5oHaRjrZP6VjW MTyVFfINyYzBfmGUn5uw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1Opu-0003Sk-L7; Sun, 16 Sep 2018 04:39:06 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1Ope-0003Nl-76 for linux-arm-kernel@lists.infradead.org; Sun, 16 Sep 2018 04:39:04 +0000 Received: from trochilidae.hsd1.wa.comcast.net (unknown [IPv6:2601:602:8700:fb00:81ae:bc59:4e6c:42ca]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 7AB0B5C00D5; Sun, 16 Sep 2018 06:38:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1537072715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=2lK0vZCW1aPI14wGfZXet/bAIJfwAIYj8AD9d3l2++o=; b=Q5MdjeQeOo6w5q+qx9ejuyhu7/XhB6idKaUbXfhwybML96qPTzL2QEUCZXMqS+8FCgnr26 q6IUtr6SBG0DabFVe4Gw/E4pooixR78oVpwD1d8XGq2dmQSjZGw0MtIrEI0J/PJfiDVdHT VG28O9hU0drjDCbuxliDHyYR054ux8g= From: Stefan Agner To: herbert@gondor.apana.org.au, davem@davemloft.net, ard.biesheuvel@linaro.org Subject: [PATCH 1/2] cpufeature: avoid warning when compiling with clang Date: Sat, 15 Sep 2018 21:38:24 -0700 Message-Id: <20180916043825.23247-1-stefan@agner.ch> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-Spam: Yes X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180915_213850_447641_B0AF9713 X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Stefan Agner , linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to warnings when building the kernel with Clang: arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable 'cpu_feature_match_AES' is not needed and will not be emitted [-Wunneeded-internal-declaration] module_cpu_feature_match(AES, aes_init); ^ Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused"). Fixes: 67bad2fdb754 ("cpu: add generic support for CPU feature based module autoloading") Signed-off-by: Stefan Agner Acked-by: Ard Biesheuvel --- include/linux/cpufeature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h index 986c06c88d81..84d3c81b5978 100644 --- a/include/linux/cpufeature.h +++ b/include/linux/cpufeature.h @@ -45,7 +45,7 @@ * 'asm/cpufeature.h' of your favorite architecture. */ #define module_cpu_feature_match(x, __initfunc) \ -static struct cpu_feature const cpu_feature_match_ ## x[] = \ +static struct cpu_feature const __maybe_unused cpu_feature_match_ ## x[] = \ { { .feature = cpu_feature(x) }, { } }; \ MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x); \ \ From patchwork Sun Sep 16 04:38:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10601665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7524417EE for ; Sun, 16 Sep 2018 04:40:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 651C22A337 for ; Sun, 16 Sep 2018 04:40:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 577E92A33C; Sun, 16 Sep 2018 04:40:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E50F22A337 for ; Sun, 16 Sep 2018 04:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yyhUDvE60HHaCr6nFbGgyaOWZqORlzTPMbUhAYfn27M=; b=ljezEgHYZQYh0y Okq54h+tahYHejYUPDjGcRNpzaKtMNR0OvwM0PDZcZjhvVdoWfW1FT59dUzGlDXQJpriXQaY1+SmE Ac8zM7fYbo5WZ5VujQOIMMVG1g9sNcf0eUkyem6i5figtwv5GME+1PRaOLAMohmyL/ob4B472XRjJ fWq+oPKKBaoCADuH/BJo+qREJVtgDhcFJ9vb8RoFuEb06MWSqLKkFdn1HJkSepLOBiq4RJknDRKdp PPTk8WRPmeVRUmQ94HrlmXfPix5AITtwCwRpDBcS02WX6k7dH6iBUrpi1wcYrU+HzLniyBZCGTUq4 XQKQIkPbEcLcLGQTSU6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1Oqc-0003kE-Tl; Sun, 16 Sep 2018 04:39:50 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1Ope-0003QP-72 for linux-arm-kernel@lists.infradead.org; Sun, 16 Sep 2018 04:39:05 +0000 Received: from trochilidae.hsd1.wa.comcast.net (unknown [IPv6:2601:602:8700:fb00:81ae:bc59:4e6c:42ca]) by mail.kmu-office.ch (Postfix) with ESMTPSA id EFC6B5C2222; Sun, 16 Sep 2018 06:38:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1537072718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lA4pWBiapQwb05oCOx8c7PAm+j6USrDO0AnRCDFKdjo=; b=zrh4Hx9Hr25DRjwB0zna5s84CAvsiwduWmtJ3iQRBg0nesurFQg2QIR/t3Olmw2/ZUcG5O dUHBabNBOPzMgvswxo9IrzdefgdVDSplb9dY1/9QaDswe4guMVhjTVDMzHIkoFlNwNMxPr ZMsjOzwfBi4G/GPHnxTinjTRAPCcxXY= From: Stefan Agner To: herbert@gondor.apana.org.au, davem@davemloft.net, ard.biesheuvel@linaro.org Subject: [PATCH 2/2] crypto: arm/crc32 - avoid warning when compiling with Clang Date: Sat, 15 Sep 2018 21:38:25 -0700 Message-Id: <20180916043825.23247-2-stefan@agner.ch> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180916043825.23247-1-stefan@agner.ch> References: <20180916043825.23247-1-stefan@agner.ch> MIME-Version: 1.0 X-Spam: Yes X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180915_213850_429559_5D265327 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Stefan Agner , linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The table id (second) argument to MODULE_DEVICE_TABLE is often referenced otherwise. This is not the case for CPU features. This leads to a warning when building the kernel with Clang: arch/arm/crypto/crc32-ce-glue.c:239:33: warning: variable 'crc32_cpu_feature' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const struct cpu_feature crc32_cpu_feature[] = { ^ Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf ("modules: mark __inittest/__exittest as __maybe_unused"). Fixes: 2a9faf8b7e43 ("crypto: arm/crc32 - enable module autoloading based on CPU feature bits") Signed-off-by: Stefan Agner Acked-by: Ard Biesheuvel --- arch/arm/crypto/crc32-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/crypto/crc32-ce-glue.c b/arch/arm/crypto/crc32-ce-glue.c index 96e62ec105d0..cd9e93b46c2d 100644 --- a/arch/arm/crypto/crc32-ce-glue.c +++ b/arch/arm/crypto/crc32-ce-glue.c @@ -236,7 +236,7 @@ static void __exit crc32_pmull_mod_exit(void) ARRAY_SIZE(crc32_pmull_algs)); } -static const struct cpu_feature crc32_cpu_feature[] = { +static const struct cpu_feature __maybe_unused crc32_cpu_feature[] = { { cpu_feature(CRC32) }, { cpu_feature(PMULL) }, { } }; MODULE_DEVICE_TABLE(cpu, crc32_cpu_feature);