Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp134257ybc; Mon, 18 Nov 2019 21:55:26 -0800 (PST) X-Google-Smtp-Source: APXvYqyYVhKXvtiX2JVpjAuHkIQC80h7ELn58P651yEPda5pxojuuVmtZ3/aSrRTDtzNBhOpCp3G X-Received: by 2002:a17:906:8319:: with SMTP id j25mr31300059ejx.170.1574142926328; Mon, 18 Nov 2019 21:55:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574142926; cv=none; d=google.com; s=arc-20160816; b=Qe1YJK2HdytAnW1Lz4xALHhHdS9V8tfwWQkj5TWPLbgBFmI4ODZXyo1Bbcu9DOBE7U EE2t0ZhQ+JIX/ogN0p6ckGyF/wLDqw4HaLVEZkcQdJFLiBDHdScDgxGfjHGV6ItcRJFg ITVcX8kiOjrf+WE9XTFYRUyn9znrgrZpd/AmHKmD1mmDD3oK1jhSRpa5LwGRgE0WeQ3v Sn/UK7SbYPXR1m+8xdwej2Iui3GPhxHaWwZHctzFt5tHojlfTjkxin7W/oIyT0mtXZKu U9mYfzGgksKmTRNfB7M7Li8dQqaBvmyMMa1lbRetKmd91/3ehTifzmb8YY2dKcaEEQTz GVqw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tqWIn7RXaSlu9+6S1R9/7J2bVRPemwhikP9i/YGrsoY=; b=vf486e9VdRI+FGB/s9O6eVW2VbOhnWyCm2UWwoDB0his2EM7l803sJrDEcWTeENzUV RuTOP5VxHtMSkgJHCVu6LTlzC8OopS0EIUa06d+IY/vI+sniVvNSqK9svJaHLPkTRt/1 /ln498hls5wQts8BqSskSvjypqeOwOoXBKKn+ZugjDsiUs7TlitNTgIV0irx+w+RYibE NR/+1EwuwiQR9k+nJ0VT/BvV1hL8C0ZzAJ3PJGy4kGqerPjPpFe9NuiF15QoQXOCOAgn TtXJF+IvqEhGDtBlwA4XypUv/VRNEkEwsgLTlXcRvz6/cHFh+G+c9YCTT7bbEosp3RC1 6acw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BsgImu1U; 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 a11si13313329eju.356.2019.11.18.21.55.01; Mon, 18 Nov 2019 21:55:26 -0800 (PST) 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=@kernel.org header.s=default header.b=BsgImu1U; 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 S1731363AbfKSFve (ORCPT + 99 others); Tue, 19 Nov 2019 00:51:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:48966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728903AbfKSFvb (ORCPT ); Tue, 19 Nov 2019 00:51:31 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A861820721; Tue, 19 Nov 2019 05:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142691; bh=9vHTsqmnu+cuuI3EJ+XhZIbw+Rq+l0wS6KturhsKzNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BsgImu1UDDoZ+Q0Ttm4RCwUhBuzkgUd9HE4cMgT6UOhRfsucPVgwe76AwR9c/pQZS lEjt6RwtkZoi36LnZZZ8l/MZYhtwJFcQTYrwWQJ06g0oHQOq4WZwtlGlT7yXxV9GrO pb7VrMJG3SZExONJUXCWSC2NVKVldAgmmafFOSAw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Agner , Ard Biesheuvel , Herbert Xu , Sasha Levin Subject: [PATCH 4.14 165/239] cpufeature: avoid warning when compiling with clang Date: Tue, 19 Nov 2019 06:19:25 +0100 Message-Id: <20191119051333.624198701@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051255.850204959@linuxfoundation.org> References: <20191119051255.850204959@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Stefan Agner [ Upstream commit c785896b21dd8e156326ff660050b0074d3431df ] 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 Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- 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 986c06c88d814..84d3c81b59781 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.20.1