Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp806028pxj; Thu, 27 May 2021 12:04:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzxQG6XLVLyDmtl6V1wj+inCcV4mgWQBcAWx54sw518QuizlS+QPyPnHktvhn80dooJPQx X-Received: by 2002:a05:6638:597:: with SMTP id a23mr4737176jar.27.1622142244976; Thu, 27 May 2021 12:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622142244; cv=none; d=google.com; s=arc-20160816; b=WFts0DDxjCnpMXwoqEAg2SWfRlnvRqDt3j1I+zR3HilniRHzUcZ2a9JMNSZdalun6n 6Rt5UaVOrGFcy5jtgzLlsTY9a+6YFmF/b/6AtEllXldiF2P9VVGAlRvg14ERvcseo89H eTUp8/HRuOtixKOLmY0rVu1hXCBOmtaXH4ugPItXXUb0+CMv6Ln7okfTL7D6YwG5dRIc 7oGJn2TLkQS4thSVyeUV9mmIHcX7Fm5LGPXcHHhFsu+3bZcCOTs4PigT6uO++fxCnR3R aLo7Q1YPMP43iOXDjVPs2kK5wl9Zep8/XKEsXUT1xDTG3qbA+5HingIDoi4KYPALlslc sDxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TYQyk8ngeGXZA4K81R6j7h5wkGIyEEoLxIZCcp15MF0=; b=S3Q+49FW0Lz8Ppb/Jk+hM/TT9/GPUOPzbLKUozSAQBxepYr+2wSsU/kwZvWMd6vpY7 O9O1+3Nqkq/nIJcu95/QYTNnyPuVpQjlesPX+AFxUeiTvn7fK/Ufb/KO+e2etZgbBdhj 2XreatbN+JjGjZNqaxglSJWBlXUg5MrG8nFggyjb2P41RHYf9rPKhx0blqllEIW1GguM GpScDEiS89N/JPwvdi6ZLYxKGfzAVRbggMVTWtjivdX21jskU1uVbws3RUzEIvvdZ6XS KThBz16rpPjfQtPh6YXON6346CJUuArAPw8Wa5CeyHjeS9cPIR/60t+xZE9zBtTtYOWT 0ZiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sfxmwW30; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f184si3131900jac.102.2021.05.27.12.03.43; Thu, 27 May 2021 12:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sfxmwW30; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232006AbhE0RsB (ORCPT + 99 others); Thu, 27 May 2021 13:48:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:41278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbhE0RsA (ORCPT ); Thu, 27 May 2021 13:48:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 296B6610A0; Thu, 27 May 2021 17:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622137587; bh=5ZRnfqRtr/J0QJfUg5D/PQYEwhdZT/hAb/+xrZGlOHU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sfxmwW3029z6rLKsitywLDXKyPX2OAKi30JDxN16STWTO7Fxr26PZB76nT//N540K pRypVB7E/b6rGdqtZClQjJc8LMRnIC5xOSC0ADPOa9ShWoBd1L53v9UPYZfOaQGizi JCJFp0jsRUvikoaoRoM/v4tIfoJphf/G/PE/22KFIDahZV/uVG4vfYkYbYHCrp4VXw gj3NDBIrliYRl/rkDUKMsF55itmp2+QosiiK2VFN7RP/bPwxP3W0Ydcui6imex8A5B Rzi9DYUBlZ+yusdeVDv99S++VjNIi8Fl+mwOyxIbsU/oyzgzZdb2Hqo5tZhTzPLwD7 69u+6T9vDNbtA== Date: Thu, 27 May 2021 10:46:25 -0700 From: Eric Biggers To: Austin Kim Cc: herbert@gondor.apana.org.au, davem@davemloft.net, catalin.marinas@arm.com, will@kernel.org, john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-security-module@vger.kernel.org, linux-crypto@vger.kernel.org, austin.kim@lge.com Subject: Re: [PATCH] crypto: arm64/gcm - remove Wunused-const-variable ghash_cpu_feature Message-ID: References: <20210527062809.GA1251@raspberrypi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210527062809.GA1251@raspberrypi> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, May 27, 2021 at 07:28:09AM +0100, Austin Kim wrote: > > The variable with MODULE_DEVICE_TABLE() is registered as platform_driver. What does this mean? There is no platform_driver involved here at all. > But ghash_cpu_feature is not used, so remove ghash_cpu_feature. It is used when the file is built as a module. > diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c > index 720cd3a58da3..c3f27d0d5329 100644 > --- a/arch/arm64/crypto/ghash-ce-glue.c > +++ b/arch/arm64/crypto/ghash-ce-glue.c > @@ -615,10 +615,5 @@ static void __exit ghash_ce_mod_exit(void) > crypto_unregister_shash(&ghash_alg); > } > > -static const struct cpu_feature ghash_cpu_feature[] = { > - { cpu_feature(PMULL) }, { } > -}; > -MODULE_DEVICE_TABLE(cpu, ghash_cpu_feature); > - Probably adding __maybe_unused to ghash_cpu_feature[] is the right thing to do. That's what module_cpu_feature_match() does. (Note that module_cpu_feature_match() can't be used here, as it seems the intent is for this module to be autoloaded when PMULL is detected, but still be loadable without it. So, that's apparently the reason for using MODULE_DEVICE_TABLE() directly.) - Eric