Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp58286pja; Fri, 22 Nov 2019 03:25:28 -0800 (PST) X-Google-Smtp-Source: APXvYqx6nzXS6tziblkun9UdQkNVm+6zu3IoyZmdfTYziOyWjt0yw7X4CdiDBxsnPthcf5lEFjgB X-Received: by 2002:a50:a7c5:: with SMTP id i63mr410976edc.79.1574421928807; Fri, 22 Nov 2019 03:25:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421928; cv=none; d=google.com; s=arc-20160816; b=T6zFJbcrc5j7oGvSWjzf5Tb3JqPSQTLiSukp8AXuf1rl7ZBmkHop5xd5KJ86NIDeNd rMLGd96VwSdVJyLdQUV7scySyuvUOrfRa3LfnRrGRv2LXDEJkBtnbYW66fczL2nMoKln jwFxM8sLuvG6rLXxi787XcEi6H+62FKz7KDXLCc9Z1D7VRoM8MDOJDtzcUBap4uyh6BN AOF5OFVNWuZlmq2u07TwWz6bLYqrh35cA4HBhEEXJEbgpnRA0S9j2uctRVaM4Y9SmVTM xcoXgUX45aTIYg9AOG+90XePidwSQbN7Rp+jOBHNxQS3nbKJ1C9fyRnozCcOzN1g0jTr x8LQ== 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=bxI77reyUHcimR7K7hzW5EZf8a4slSlNjqAwtJSPzMyjvNaisEgV/UL61dlGAK1MJy Xn9eVgWS+f5+HhWeZiBwGN1ziXDQG6N83NNLD5e2OPexgNZPbBEecOKQkDu4gCctXQSm LL4zHNk8S8rgvtZvOCJQUQUFVFhLm0lQDdbZ8yCs0uJm6bNFnxnn6scVxfQ9vFRIotHm JBxPF6Xq7tVbatb2npk04h5stzMS8t3SUvza216eAdex/66NthzpGu+t9YxVCjfZqC6L JF98XQFJyKh/bS1uQFdrGOkc6GqNjbglFO3n0YhHDZrsg6r38L0wFbzzbjlmRcCUexYr eKlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r6OdkX97; 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 c10si4586263eda.284.2019.11.22.03.25.05; Fri, 22 Nov 2019 03:25:28 -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=r6OdkX97; 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 S1729262AbfKVKnj (ORCPT + 99 others); Fri, 22 Nov 2019 05:43:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:49168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729256AbfKVKnf (ORCPT ); Fri, 22 Nov 2019 05:43:35 -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 D53F020637; Fri, 22 Nov 2019 10:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419415; bh=9vHTsqmnu+cuuI3EJ+XhZIbw+Rq+l0wS6KturhsKzNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r6OdkX97n895jeTFNU5uzwUv5euYDzfdlM6us1q9JOsOBVBFgI05ElzIVXOBvqYqt irNG4tHfoAC40ndrqsD3NTqSI9M+aea25gwanLttfY6gwWme/C5tepXcZRy1Gq3jvL SxuBwpFXKuP238tzKZgvCZLJgpWFe5sv9+PeoStg= 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.9 103/222] cpufeature: avoid warning when compiling with clang Date: Fri, 22 Nov 2019 11:27:23 +0100 Message-Id: <20191122100910.799884000@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@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