Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3003591ybi; Mon, 17 Jun 2019 14:28:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8srIGcQPibKvEqng1v/YngFAzryZ/nzZ/CZqbhW9KCocAv95smvWITsbvOuwF7exe0+3d X-Received: by 2002:a17:90a:b908:: with SMTP id p8mr1195004pjr.94.1560806897044; Mon, 17 Jun 2019 14:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560806897; cv=none; d=google.com; s=arc-20160816; b=FCwM5L1bOB6F9IuMRP1wm4ZBpTFChdjg1hyPgaTjuFDYzCFaaKrSvSkP7IxANTXJKY G91/QH23kH29PgtZb5Qe3+gk90zXZpgUqCCq17N7fql5FtPsY1CTnCwF9fUhXdFPIw7N qf94AWqEW9PRjUysO/o2Hg2SY2J3PhJtPrk8qensq2I+jFgc9FVI7mwMRSrV9Gou4xNv OwaBjB69AxlvB10i4hwheb1yrEDD6a1VDCIIT527rtMaC7W2/QiWR8xWpUTSangl7oU8 LIbpRjzb6i5dLRV22+Hys+cjXsos9hDRUcLaM1bi8Hy5GUo7o52X3aln0H+Ugx/cgdhz Zv/w== 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=x4EV9GWg9kxvLLc+lzrtkGtsAfSuTgqF1sT3//90ZUk=; b=u/r6wdowjVgU0NSfmHAcwqUCe/nUQzONhJvbf83TcYOpgSwOG8IYBnT5ZiEUK1N3ly NZtIWi3DAQXaTsicJxwOh5mb/FiJT3HpneSpoYtyv76OHkKfCZum7zzlxDZfRpVxB8A0 j0Vvjb1P5mavuhcQZpF+XmSjjbCXkaTmF+bb4gLvtYAffpZMHrEMi1ELD6OE5Uwfvhx5 ErS3gWVojCw/6ncj5mTe4n2MCoP5S6y1sNh2SSl2Y35ak2s0TbTl2D6qmKX/EGH7PZxR ruGQ86BY5J2oRIZfcSbG+7mF3uCka52Zqi2tyNc5ttKVPzCCQFVyZr1jUjqaIxbvTzIm CFVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M0LuQ8HI; 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 n11si13203011pgi.27.2019.06.17.14.28.02; Mon, 17 Jun 2019 14:28:17 -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=@kernel.org header.s=default header.b=M0LuQ8HI; 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 S1730163AbfFQV0D (ORCPT + 99 others); Mon, 17 Jun 2019 17:26:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:52392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730132AbfFQV0A (ORCPT ); Mon, 17 Jun 2019 17:26:00 -0400 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 786FF20657; Mon, 17 Jun 2019 21:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560806759; bh=SK3oSmqXwer41s9Yr8FkCSvEhPOOeSfkILVtbJpAmIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M0LuQ8HI3a02NiI5CjjCIAVl0NlVsavgQvN23bZ9lqAARA0HcWU8Flv9jQ11RJpfE DYdFnu45BbGNUxZ0os1cKjC118gdlZccvguf/+ILBaEzeJ3fsy4sCDma26C63hXII7 rGOQ8/GgF8Ny2MQjT9c3qTGezbXMBJi/5YiEYk10= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vishal Verma , Qian Cai , Dan Williams , Sasha Levin Subject: [PATCH 4.19 47/75] libnvdimm: Fix compilation warnings with W=1 Date: Mon, 17 Jun 2019 23:09:58 +0200 Message-Id: <20190617210754.573771786@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190617210752.799453599@linuxfoundation.org> References: <20190617210752.799453599@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 [ Upstream commit c01dafad77fea8d64c4fdca0a6031c980842ad65 ] Several places (dimm_devs.c, core.c etc) include label.h but only label.c uses NSINDEX_SIGNATURE, so move its definition to label.c instead. In file included from drivers/nvdimm/dimm_devs.c:23: drivers/nvdimm/label.h:41:19: warning: 'NSINDEX_SIGNATURE' defined but not used [-Wunused-const-variable=] Also, some places abuse "/**" which is only reserved for the kernel-doc. drivers/nvdimm/bus.c:648: warning: cannot understand function prototype: 'struct attribute_group nd_device_attribute_group = ' drivers/nvdimm/bus.c:677: warning: cannot understand function prototype: 'struct attribute_group nd_numa_attribute_group = ' Those are just some member assignments for the "struct attribute_group" instances and it can't be expressed in the kernel-doc. Reviewed-by: Vishal Verma Signed-off-by: Qian Cai Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/bus.c | 4 ++-- drivers/nvdimm/label.c | 2 ++ drivers/nvdimm/label.h | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 9148015ed803..a3132a9eb91c 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -612,7 +612,7 @@ static struct attribute *nd_device_attributes[] = { NULL, }; -/** +/* * nd_device_attribute_group - generic attributes for all devices on an nd bus */ struct attribute_group nd_device_attribute_group = { @@ -641,7 +641,7 @@ static umode_t nd_numa_attr_visible(struct kobject *kobj, struct attribute *a, return a->mode; } -/** +/* * nd_numa_attribute_group - NUMA attributes for all devices on an nd bus */ struct attribute_group nd_numa_attribute_group = { diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c index 452ad379ed70..9f1b7e3153f9 100644 --- a/drivers/nvdimm/label.c +++ b/drivers/nvdimm/label.c @@ -25,6 +25,8 @@ static guid_t nvdimm_btt2_guid; static guid_t nvdimm_pfn_guid; static guid_t nvdimm_dax_guid; +static const char NSINDEX_SIGNATURE[] = "NAMESPACE_INDEX\0"; + static u32 best_seq(u32 a, u32 b) { a &= NSINDEX_SEQ_MASK; diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h index 18bbe183b3a9..52f9fcada00a 100644 --- a/drivers/nvdimm/label.h +++ b/drivers/nvdimm/label.h @@ -38,8 +38,6 @@ enum { ND_NSINDEX_INIT = 0x1, }; -static const char NSINDEX_SIGNATURE[] = "NAMESPACE_INDEX\0"; - /** * struct nd_namespace_index - label set superblock * @sig: NAMESPACE_INDEX\0 -- 2.20.1