Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5395012imm; Tue, 18 Sep 2018 08:53:00 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0aBpvl7bA/cFY8Nnslrz59bt5tjRabZUX0nAi2t0fpu69EqSoQ7kTqZ3t6UxuVvBTwLI3 X-Received: by 2002:a62:565c:: with SMTP id k89-v6mr31442962pfb.212.1537285980471; Tue, 18 Sep 2018 08:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537285980; cv=none; d=google.com; s=arc-20160816; b=kvq73uNBd0k22KO5LJi4pjsn7Ar9tPxjeaYR+nEw8rmkvxlnPSxFQ7ptPWHG3mBRmI jvdhKMnF4dl0EjgxbLvapL6R2dQJkcxX9Yg5gyjh7tSzUajqaEMNO81P9iUS1R9NKC3C AkELmomf5eeDkkBdlHnLLGXncWk0U67g/HbK0740vCKZje+3n7PtReimBlLMZG7HEYv2 1TMJhUFx2QwLMOG+RLCR1ghkl0o0lqHBmvtozwFpIL6xqYFEF3RafWcQQOm/ioXSN3mc v2/V25mrssjCZcZNNzumrQhvM52/meLLONaCSSiBPJJvX4TOafMwUgj6Y2w2/lMeuH+I r3mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=loYmR8xi2ZI4YXOMV9gPrpZIADUK+hdQL3j3v5Sf3jo=; b=xo52HOuL2mErNu7lLeiLlIBh2KHrzyMZtwUMi2KT1l/nGOfuXwLtF0JzPrblz6b07k y8+7KXYUMGNfqJbbl/h5f+Ly+w1vpoz5pjbeg0YpQLQSlcu9fYlce448DBSRVN46pQmG MAuQvGrcQUVZAWC1U6W+N5OUQghw7tcXPhAF14HvrzxNgERWK9icYlZKRXG9wsbye30p NzX/lZei8bouAUiZxxwWI/L8AH1/QqpLbe3U4HWl8S5MnK2ovBsMhnq4m3riFhRp6h4c vesZJ1x/2Cic9M1uTFfYXt+Pfgab+qHHm3q4MuZkX+hRg1eoAD2IJI3M4IEZLhKueq7Z rPMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QZvfXCoY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m61-v6si18986455plb.296.2018.09.18.08.52.39; Tue, 18 Sep 2018 08:53: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=@linaro.org header.s=google header.b=QZvfXCoY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730112AbeIRVZM (ORCPT + 99 others); Tue, 18 Sep 2018 17:25:12 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:44483 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729249AbeIRVZM (ORCPT ); Tue, 18 Sep 2018 17:25:12 -0400 Received: by mail-io1-f67.google.com with SMTP id 75-v6so1946646iou.11 for ; Tue, 18 Sep 2018 08:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=loYmR8xi2ZI4YXOMV9gPrpZIADUK+hdQL3j3v5Sf3jo=; b=QZvfXCoYXKaYeHMXJdFGMjKg5krvxjUcGBbB5MzC8ojge1fB1UWRd+XKiALL1mzmOM U049GfHQ8Cj0I2FjMyBLdQAueR4eLXcdeP06UCE2SDv/54llz/e9Cw1Dw80+4hXW35/I wS76erwqcglLHllem8Ahm/OcsnUEdL0BDOoZ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=loYmR8xi2ZI4YXOMV9gPrpZIADUK+hdQL3j3v5Sf3jo=; b=H8c3RnaKB8h8btVagS6UMfqIOZ6O0HOObqb+ao+lPnxp7boXeHDADjQZ4UPmGV1ccn BEkleLy055Wx2GZ1YY9WXm5TshIxP5dl9IJaQ+ra6aIutCggBW9ZWHkJb60/jbe3fQPJ nqGOPQl5dNLPSF5nvUPDdvwcrctrX8xkjnD8ebo4cc8amnVLPFMH6VaycTB0FYxm5H+k tbUdsgRx1ajAS+H1U7JBEQieI737oOzAN70+BCz8+eoCabbMjo7jHdrgQP+VgDLz7Xay Rltd3VaerqKvmJORuTe2BqJoCfGw1QOEN4DZr4whpUU1/MIDfjohUMdF77UjTTWRpHZ1 vWUw== X-Gm-Message-State: APzg51Amzxxta5/C6HQ8GIkc3r77oXjZ4/f7HSDMtvh1Hxc51Hu/aVsN bUtjMOd4rbTvUZYZ2fIrx++98ZB6fdI9cJeChBvo3Q== X-Received: by 2002:a6b:ba86:: with SMTP id k128-v6mr24869185iof.170.1537285920786; Tue, 18 Sep 2018 08:52:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:2848:0:0:0:0:0 with HTTP; Tue, 18 Sep 2018 08:52:00 -0700 (PDT) In-Reply-To: <20180916043825.23247-2-stefan@agner.ch> References: <20180916043825.23247-1-stefan@agner.ch> <20180916043825.23247-2-stefan@agner.ch> From: Ard Biesheuvel Date: Tue, 18 Sep 2018 08:52:00 -0700 Message-ID: Subject: Re: [PATCH 2/2] crypto: arm/crc32 - avoid warning when compiling with Clang To: Stefan Agner Cc: Herbert Xu , "David S. Miller" , Russell King , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-arm-kernel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15 September 2018 at 21:38, Stefan Agner wrote: > 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); > -- > 2.19.0 >