]>
Commit | Line | Data |
---|---|---|
1cd4ef76 SL |
1 | From b1a99bc130cbf8ec8485a0e416ebec725af43200 Mon Sep 17 00:00:00 2001 |
2 | From: Qian Cai <cai@lca.pw> | |
3 | Date: Thu, 16 May 2019 12:04:53 -0400 | |
4 | Subject: libnvdimm: Fix compilation warnings with W=1 | |
5 | ||
6 | [ Upstream commit c01dafad77fea8d64c4fdca0a6031c980842ad65 ] | |
7 | ||
8 | Several places (dimm_devs.c, core.c etc) include label.h but only | |
9 | label.c uses NSINDEX_SIGNATURE, so move its definition to label.c | |
10 | instead. | |
11 | ||
12 | In file included from drivers/nvdimm/dimm_devs.c:23: | |
13 | drivers/nvdimm/label.h:41:19: warning: 'NSINDEX_SIGNATURE' defined but | |
14 | not used [-Wunused-const-variable=] | |
15 | ||
16 | Also, some places abuse "/**" which is only reserved for the kernel-doc. | |
17 | ||
18 | drivers/nvdimm/bus.c:648: warning: cannot understand function prototype: | |
19 | 'struct attribute_group nd_device_attribute_group = ' | |
20 | drivers/nvdimm/bus.c:677: warning: cannot understand function prototype: | |
21 | 'struct attribute_group nd_numa_attribute_group = ' | |
22 | ||
23 | Those are just some member assignments for the "struct attribute_group" | |
24 | instances and it can't be expressed in the kernel-doc. | |
25 | ||
26 | Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> | |
27 | Signed-off-by: Qian Cai <cai@lca.pw> | |
28 | Signed-off-by: Dan Williams <dan.j.williams@intel.com> | |
29 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
30 | --- | |
31 | drivers/nvdimm/bus.c | 4 ++-- | |
32 | drivers/nvdimm/label.c | 2 ++ | |
33 | drivers/nvdimm/label.h | 2 -- | |
34 | 3 files changed, 4 insertions(+), 4 deletions(-) | |
35 | ||
36 | diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c | |
37 | index a6746a1f20ae..2f1b54fab399 100644 | |
38 | --- a/drivers/nvdimm/bus.c | |
39 | +++ b/drivers/nvdimm/bus.c | |
40 | @@ -608,7 +608,7 @@ static struct attribute *nd_device_attributes[] = { | |
41 | NULL, | |
42 | }; | |
43 | ||
44 | -/** | |
45 | +/* | |
46 | * nd_device_attribute_group - generic attributes for all devices on an nd bus | |
47 | */ | |
48 | struct attribute_group nd_device_attribute_group = { | |
49 | @@ -637,7 +637,7 @@ static umode_t nd_numa_attr_visible(struct kobject *kobj, struct attribute *a, | |
50 | return a->mode; | |
51 | } | |
52 | ||
53 | -/** | |
54 | +/* | |
55 | * nd_numa_attribute_group - NUMA attributes for all devices on an nd bus | |
56 | */ | |
57 | struct attribute_group nd_numa_attribute_group = { | |
58 | diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c | |
59 | index 6a16017cc0d9..1fb3a2491131 100644 | |
60 | --- a/drivers/nvdimm/label.c | |
61 | +++ b/drivers/nvdimm/label.c | |
62 | @@ -25,6 +25,8 @@ static guid_t nvdimm_btt2_guid; | |
63 | static guid_t nvdimm_pfn_guid; | |
64 | static guid_t nvdimm_dax_guid; | |
65 | ||
66 | +static const char NSINDEX_SIGNATURE[] = "NAMESPACE_INDEX\0"; | |
67 | + | |
68 | static u32 best_seq(u32 a, u32 b) | |
69 | { | |
70 | a &= NSINDEX_SEQ_MASK; | |
71 | diff --git a/drivers/nvdimm/label.h b/drivers/nvdimm/label.h | |
72 | index 1ebf4d3d01ba..9ed772db6900 100644 | |
73 | --- a/drivers/nvdimm/label.h | |
74 | +++ b/drivers/nvdimm/label.h | |
75 | @@ -38,8 +38,6 @@ enum { | |
76 | ND_NSINDEX_INIT = 0x1, | |
77 | }; | |
78 | ||
79 | -static const char NSINDEX_SIGNATURE[] = "NAMESPACE_INDEX\0"; | |
80 | - | |
81 | /** | |
82 | * struct nd_namespace_index - label set superblock | |
83 | * @sig: NAMESPACE_INDEX\0 | |
84 | -- | |
85 | 2.20.1 | |
86 |