Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2562547imm; Sat, 15 Sep 2018 21:39:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ0it6H+HcKrKDFQxLHXlta11vIbUocpXU8dUKYRkqz/vmIWhTVAhmyTWu9CwEikAL0b32X X-Received: by 2002:a65:594b:: with SMTP id g11-v6mr18241150pgu.260.1537072740030; Sat, 15 Sep 2018 21:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537072740; cv=none; d=google.com; s=arc-20160816; b=Q9IiknTaK7NDU0t40Kik1hCxRf+ef/jJVjwwdGugPvBKodux1s4YmDKA3FGbirbbxW RGZACPpXHYOejAddQ28srQzJtV18rxVgeDITDm+81LoSbLJyeA4ixisThklj6ERxkVUy WGtLPK2YWXkOlUqGGondjViC6DT4ZWA7zZN3mKuRuS8LIPy53i9yrQYLTSrwl3EvbaHl uVAeiAzZf+Ia8A8RyJ0+8FCNoMO3be3bQmeaa+P2v9YKXSTjm2Z/pEyHit2JmZPsqxb2 sLOPpYM2BvjMWJfsXDogW5Blh6Ge2r2DRC/DnsAF6mtuivyCxJDSidMF8UafkGvUcOUA I54Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2lK0vZCW1aPI14wGfZXet/bAIJfwAIYj8AD9d3l2++o=; b=le5gYxhu9h5fEcz7qSvuNCEKo76J4+9i0qlCkUlCb10tr+dnhOQY048GmQDm2mst2/ RDsEbCNau867MSxy+qX9WOpmN06z1PVN4pk/9UNELr3mxYVjCDtWlc+LlIZEmypG8PPk /MEmh/vUpU65OoNKAEWvQJuHZ6XQfWIWfH/u/tzqHLsoyx4K/oEuYM6JTytbak6Enw57 QJ2x2LxjCZb8J8Iz10JuFkDkDNuoOc7YVkAtwzwbcesAacEMLECkS57p4rfrr75pZcHN RnqyIW16A1ocb13ZoTT8TUR6TArwPoembVFqjGQqb1UsET5CLRJcpUT35YdUp2nP87uj lEjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=Q5MdjeQe; 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 n137-v6si12459133pfd.177.2018.09.15.21.38.45; Sat, 15 Sep 2018 21:39:00 -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=pass header.i=@agner.ch header.s=dkim header.b=Q5MdjeQe; 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 S1726848AbeIPKAM (ORCPT + 99 others); Sun, 16 Sep 2018 06:00:12 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:38464 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725739AbeIPKAM (ORCPT ); Sun, 16 Sep 2018 06:00:12 -0400 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 Cc: linux@armlinux.org.uk, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Agner 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 Content-Transfer-Encoding: 8bit X-Spam: Yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); \ \ -- 2.19.0