From patchwork Fri Oct 5 16:18:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 148226 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp645602lji; Fri, 5 Oct 2018 09:19:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV60zQbcGZdMNkEAcoJ97HexpaS90Jk/k7eFdYkKZIAfQgLqFvMW1UJQj6txoHdKwmIZEyRFP X-Received: by 2002:a63:88c1:: with SMTP id l184-v6mr1249236pgd.431.1538756341770; Fri, 05 Oct 2018 09:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538756341; cv=none; d=google.com; s=arc-20160816; b=TheCcKaX35nOe1bl8hq79c8Vcgt1seMAqgm453V9O+toqrlp6DHYapSnc+AAmLkD0g Yr1RDH1THr37+UeKhXWT3zqDHOwlKIHr+gRjHNedLa7LCrzs88AQJ+hl/EdJSw/xUXaL g5ehLrt73PP38ppjjSMLG6/l8kKFLjlCe5OwPDbgjoYOuV7VEbBzCPmRmEYlJ/WtcC/J CLp44GkzF1F9xNx7du3BtnkmKgwCSBOqiKzdmc+CXFVPeHeuEbt2Nfkm9nDXZy5oJf9y iSLZiDNK5T5Sl8X9p9SNId6Rc/+AemVEKRBpv7Lm8Do1LMxJdCEfGXDap10cmok+B+83 vz7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=y4mQGRHnfX5kxiBL1wpwEfkCHKIt8hY9Bpx/XTUDOwk=; b=tJkSOElw0obaYbU7cTV/RJERssdHsG47ZmS2chkdjD/VyLjpge5ae6/igI+wxa3Uq0 pBzPzqpMqFHYkZjgpDkJwO8IyqkM47fzmcx9GP7Ieb4YuLVljKCRrx4LZu2yDyOhKnaf pAZsDsiSlNpuuOT9KyvdvLkRLD7CbEj+qqh9XEwBqvwO3AQmdvj+PnQqHSMPxq542Owp q3Zc5JWMoQDjRGxS7hYCprMKWkFuRlGUcX9M5Keza5Hx+ejUt9uk+B9ORvn0MWSoRpqd aexLGOy7UtlzmCM2o+tbLed+a1vOHrwR6wT417C27qFY0nC6bmcyKqWnQuz+iFE+jHKT 2Y5w== ARC-Authentication-Results: i=1; mx.google.com; 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 97-v6si9009919pla.34.2018.10.05.09.19.01; Fri, 05 Oct 2018 09:19:01 -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; 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 S1730437AbeJEXSW (ORCPT + 32 others); Fri, 5 Oct 2018 19:18:22 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:46027 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728967AbeJEXSW (ORCPT ); Fri, 5 Oct 2018 19:18:22 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1M4p-1fjOZh2og7-012lnk; Fri, 05 Oct 2018 18:18:46 +0200 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1M4p-1fjOZh2og7-012lnk; Fri, 05 Oct 2018 18:18:46 +0200 From: Arnd Bergmann To: Ilya Dryomov , "Yan, Zheng" , Sage Weil Cc: Arnd Bergmann , Greg Kroah-Hartman , Philippe Ombredanne , Luis Henriques , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ceph: use an enum instead of 'static const' to define constants Date: Fri, 5 Oct 2018 18:18:38 +0200 Message-Id: <20181005161845.959919-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:U7g/JovbVRmUvIWHMhDo9InnZSi8KsJh/pi3+A9ngUPNgizb2Hf W5RQ3Ipj5w4F+uq/eGlHnv0KHiu9E3Z3v8efvqvItWENnFaKoAgvkLL4ZQGyC4Df3naQzFW PaMRbzlR2g1ammXJ2S7ylluXYLtpMJYx6E8vLzMdiXeUJqmx572WOPRC75My6euQXLE0vcr sdzAMZ7vDKwFIJWEWNlrQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:DnMKUp3GjcI=:FqVSfnHXe1ZrtpryTC8gJm HANSyzqF8t2DogP+/YNO37uKFFLM3wXR9Upn6BNvsJYA2xMm/kVHZ1igEMxJcA8iURZ1bCqKA FESzZD7+nbCZev+CVx7QE1cvBIQZsqcIKLCZGdFnJtJjIBPewIcz/Y2vdAE5/HvmhRItG4+/E YQCMOBu6nzKvJIR1NxV2pwrv/pZWzFA2IjLKohM/8H+/J6JXSyKumJja/g2OL7K6f5Kmp9CtJ SBOPlLS1anV5cj958REeAlVKv5VBAqpKsRJjXDkPJB6HB0u1BPCQPYLYcQOWfGho1sxQ78PNU 1bcMgsUwjc8TpcqhKmGgTQRE2oVEQnH+C5MM4jTs/TkY49OgvxwOVmzzOLu5wS8ep/WOa5/jm sucpgYqUBbvD8uuJx2qgP4YIR5ENeiMHbL7WYcdCmbX9IqSUjm0V1zeD2p2U+BIvspLG+NmNU k4Y2AEfsSKxR5yevvBJdEESRgdWLLD3r39FVJoLPsL9C8UabPzOnfMgAXqZejyVMwQ+uvjFXh XPZIKVkB09UReAnAgcYuBQSgWlaEiMCLlYcbCxachz4mX0wgQ2TIhK6NbiW4q4LrAQxcFr90m XYnOvf0meOU5pT7XLOgrIfWLe7oiNk1A45nwEzdsgm0tThnNr0T0CPjjBbWunzjdm6eJXy4pd udV1YW/OZtQy4StF0H4w9D7vLaiVokUSIXzPy6S2/86CqmEh6wgaoiLoXXZMbYMUFIpU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building with W=1 produces lots of warnings for files including ceph_features.h: include/linux/ceph/ceph_features.h:15:24: error: 'CEPH_FEATUREMASK_SERVER_M' defined but not used [-Werror=unused-const-variable=] The normal way to define compile-time constants in the kernel is to use either macros or enums, and gcc does not warn about those. Converting to an enum is simple here and means we can still use the names while debugging. Signed-off-by: Arnd Bergmann --- include/linux/ceph/ceph_features.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) -- 2.18.0 diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index 6b92b3395fa9..676908eca060 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h @@ -11,15 +11,15 @@ #define CEPH_FEATURE_INCARNATION_2 (1ull<<57) // CEPH_FEATURE_SERVER_JEWEL #define DEFINE_CEPH_FEATURE(bit, incarnation, name) \ - static const uint64_t CEPH_FEATURE_##name = (1ULL<