From nobody Sat Feb 7 22:21:10 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E96E1EB64D7 for ; Fri, 16 Jun 2023 16:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjFPQGl (ORCPT ); Fri, 16 Jun 2023 12:06:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjFPQGi (ORCPT ); Fri, 16 Jun 2023 12:06:38 -0400 Received: from imap4.hz.codethink.co.uk (imap4.hz.codethink.co.uk [188.40.203.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ADB91FCC for ; Fri, 16 Jun 2023 09:06:36 -0700 (PDT) Received: from [167.98.27.226] (helo=rainbowdash) by imap4.hz.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1qABy1-00G6Sm-I7; Fri, 16 Jun 2023 17:06:30 +0100 Received: from ben by rainbowdash with local (Exim 4.96) (envelope-from ) id 1qABy1-00034Y-0C; Fri, 16 Jun 2023 17:06:29 +0100 From: Ben Dooks To: nvdimm@lists.linux.dev Cc: linux-kernel@vger.kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, ira.weiny@intel.com, Ben Dooks Subject: [PATCH] nvdimm: make nd_class variable static Date: Fri, 16 Jun 2023 17:06:28 +0100 Message-Id: <20230616160628.11801-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The nd_class is not used outside of drivers/nvdimm/bus.c and thus sparse is generating the following warning. Remove this by making it static: drivers/nvdimm/bus.c:28:14: warning: symbol 'nd_class' was not declared. Sh= ould it be static? Signed-off-by: Ben Dooks Reviewed-by: Ira Weiny --- drivers/nvdimm/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 954dbc105fc8..5852fe290523 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -25,7 +25,7 @@ =20 int nvdimm_major; static int nvdimm_bus_major; -struct class *nd_class; +static struct class *nd_class; static DEFINE_IDA(nd_ida); =20 static int to_nd_device_type(const struct device *dev) --=20 2.39.2