Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6475882yba; Tue, 14 May 2019 08:10:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTgm4nCzcUGR3j5ed5j4qACj/sVnaD2ocm78oZxOQWLRhkNiBcXgSgfzN5mF3jfYqbB0GP X-Received: by 2002:a17:902:a01:: with SMTP id 1mr37933777plo.36.1557846653852; Tue, 14 May 2019 08:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557846653; cv=none; d=google.com; s=arc-20160816; b=yuQcgvBb5Q8aNTDNFxf9qjVho3jg/dEuKlAaNndSiSINmyk1R8RxXC7xUAOH/VxyCF AosLi/mB67ioEhnl+vCfXIlN1POUuL3M34jGVM1L9zgcRwSPn0lgiHAhrDkeDdeZfSYm Ows8ioTVkE63L5YSFlW8iuhr2GSpW2O305m02Z+GubYIjVCdHuw+fljEXTi1x+P0CUTF 9D/NICtZvnLKgFcDcwFkQ/el9e0cE8lIq5nitYifG86AeSPKBUT0CdDLjh4qB10Ne5g2 hiBn0FD/H8+C3Cr+H2nY3QjxtWdpgIfb3Pnsel/XCcwLJpR3vljuOGKXTH7f4lVjkphK Vaww== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=7kZvhpKITp7GpY2UYW4YcAvoZ7pH6PjHdqS7w9gr3cw=; b=oUgCxL3nkpTotmsopuVs4o7KyJryZcc3tFQlacP8VSYwiyMRWfCo7EDxEXYF6iizGh aSQaRszlfG4Cb3eU6Cx5HH9K6lc3fVglRE1jsNwa0+QtQZbel8kQgTOabaZCjao0zNda 4QhJ3LuR0qiK5+26dJ/VgeQgmHmY1WNpGyMTcLDdJKSXfvh+0lkhW5Q44slLjxvQqE/l wJgR+evLXM0c4EyrHVfWGPVhQqMWIPdkoDwuzBMiiy0Z4F3Hy5b3CGkXWAF90LJk76A6 JvjfSkTSx0Fa4/IlSYTUdhRFrDI8BqJwQpfI05rLH/42lmTn1PkWIEwjh5C2hBmlEl3Z LSKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=FuNs4AlL; 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 17si5016060pfw.148.2019.05.14.08.10.25; Tue, 14 May 2019 08:10:53 -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=@lca.pw header.s=google header.b=FuNs4AlL; 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 S1726400AbfENPIk (ORCPT + 99 others); Tue, 14 May 2019 11:08:40 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37446 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbfENPIk (ORCPT ); Tue, 14 May 2019 11:08:40 -0400 Received: by mail-qt1-f194.google.com with SMTP id o7so19406605qtp.4 for ; Tue, 14 May 2019 08:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7kZvhpKITp7GpY2UYW4YcAvoZ7pH6PjHdqS7w9gr3cw=; b=FuNs4AlL6ZoplYtEJAQPOUNR/irdssflBkI+WQYPo1k/Wp9qb40VYJ1S/iMw+nVr0Z 4W4KadJrj7s3iAuyCBi8kLa3aqKQxyjzYo7fAC8lYvsILAF4pYUFEVOvOOhlTV4tyOG8 JSmJJuF+v9bt7JN7AIJ7VGwKBNTBusf8T15Nwptam76/E/bo8Vlk4vb5QhKdKqRMpced Ke2C12ECJhs+pKHO4zwcieQTkqMX58OBTmeeO7l1iAcqgKYimyU921AyV77UcNGmNsfn Y5kfuxZg6vtXDRNqV7zxGzPkon5jAyrfhclfTkPWY0mMc7p7B0eCrm0cRmZ/7CiNimR7 wczw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7kZvhpKITp7GpY2UYW4YcAvoZ7pH6PjHdqS7w9gr3cw=; b=j5aOw5AF1zlgH8t3tHc/J8KAg6WuX9m5wFVsIevgvvs2DjPyFzJLT4EFLR7mnTtnb9 PrbeXWaRjnaBK+kRDra14CwsH+gDFqL1GVujPljNEmZtKZTin44T/aRgQPNPixt3wwZ4 Vl0W9kEIo/nDqOZ0qL/n7JEZvFRW0KYHG/hBFtOnXKx6v9dyH2vnkFhxjETX7XPT/JKS FtmaqwlcJ9ORxoKTMas0k1vlAItlyBnwiyoC5AkzKWdATFOv5AZK0P2/Lpa9X6p1JqOm WymUS4FOeHy/fjiDR9IeDR0nEYzsFy0JqvS9BQGVejH9rxPu3684uwVdNZ970pJ0EHks 3nQQ== X-Gm-Message-State: APjAAAX7GJXMihbI7nyeN9eSO++Cih7Z0JdGjBYRQdsnixlro06iVsXF Y0jybfR6YZov9Cp8JmlpwC/7jMXsmME= X-Received: by 2002:ac8:2924:: with SMTP id y33mr29791366qty.212.1557846519358; Tue, 14 May 2019 08:08:39 -0700 (PDT) Received: from ovpn-120-85.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id b19sm8577242qkk.51.2019.05.14.08.08.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 08:08:38 -0700 (PDT) From: Qian Cai To: akpm@linux-foundation.org Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, keith.busch@intel.com, ira.weiny@intel.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [RESEND PATCH] nvdimm: fix some compilation warnings Date: Tue, 14 May 2019 11:07:35 -0400 Message-Id: <20190514150735.39625-1-cai@lca.pw> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=] The commit d9b83c756953 ("libnvdimm, btt: rework error clearing") left an unused variable. drivers/nvdimm/btt.c: In function 'btt_read_pg': drivers/nvdimm/btt.c:1272:8: warning: variable 'rc' set but not used [-Wunused-but-set-variable] Last, 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 = ' Reviewed-by: Vishal Verma Signed-off-by: Qian Cai --- drivers/nvdimm/btt.c | 6 ++---- drivers/nvdimm/bus.c | 4 ++-- drivers/nvdimm/label.c | 2 ++ drivers/nvdimm/label.h | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 4671776f5623..9f02a99cfac0 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1269,11 +1269,9 @@ static int btt_read_pg(struct btt *btt, struct bio_integrity_payload *bip, ret = btt_data_read(arena, page, off, postmap, cur_len); if (ret) { - int rc; - /* Media error - set the e_flag */ - rc = btt_map_write(arena, premap, postmap, 0, 1, - NVDIMM_IO_ATOMIC); + btt_map_write(arena, premap, postmap, 0, 1, + NVDIMM_IO_ATOMIC); goto out_rtt; } diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 7ff684159f29..2eb6a6cfe9e4 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -642,7 +642,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 = { @@ -671,7 +671,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 f3d753d3169c..02a51b7775e1 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 e9a2ad3c2150..4bb7add39580 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 (Apple Git-117)