Skip to content

Commit 6905310

Browse files
ShivaprasadGBhatdjbw
authored andcommitted
ndtest: Cleanup all of blk namespace specific code
With the nd_namespace_blk and nd_blk_region infrastructures being removed, the ndtest still has some references to the old code. So the compilation fails as below, ../tools/testing/nvdimm/test/ndtest.c:204:25: error: ‘ND_DEVICE_NAMESPACE_BLK’ undeclared here (not in a function); did you mean ‘ND_DEVICE_NAMESPACE_IO’? 204 | .type = ND_DEVICE_NAMESPACE_BLK, | ^~~~~~~~~~~~~~~~~~~~~~~ | ND_DEVICE_NAMESPACE_IO ../tools/testing/nvdimm/test/ndtest.c: In function ‘ndtest_create_region’: ../tools/testing/nvdimm/test/ndtest.c:630:17: error: ‘ndbr_desc’ undeclared (first use in this function); did you mean ‘ndr_desc’? 630 | ndbr_desc.enable = ndtest_blk_region_enable; | ^~~~~~~~~ | ndr_desc ../tools/testing/nvdimm/test/ndtest.c:630:17: note: each undeclared identifier is reported only once for each function it appears in ../tools/testing/nvdimm/test/ndtest.c:630:36: error: ‘ndtest_blk_region_enable’ undeclared (first use in this function) 630 | ndbr_desc.enable = ndtest_blk_region_enable; | ^~~~~~~~~~~~~~~~~~~~~~~~ ../tools/testing/nvdimm/test/ndtest.c:631:35: error: ‘ndtest_blk_do_io’ undeclared (first use in this function); did you mean ‘ndtest_blk_mmio’? 631 | ndbr_desc.do_io = ndtest_blk_do_io; | ^~~~~~~~~~~~~~~~ | ndtest_blk_mmio The current patch removes the specific code to cleanup all obsolete references. Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> Link: https://lore.kernel.org/r/165763940218.3501174.7103619358744815702.stgit@ltc-boston123.aus.stglabs.ibm.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 149d171 commit 6905310

File tree

1 file changed

+0
-77
lines changed

1 file changed

+0
-77
lines changed

tools/testing/nvdimm/test/ndtest.c

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -134,39 +134,6 @@ static struct ndtest_mapping region1_mapping[] = {
134134
},
135135
};
136136

137-
static struct ndtest_mapping region2_mapping[] = {
138-
{
139-
.dimm = 0,
140-
.position = 0,
141-
.start = 0,
142-
.size = DIMM_SIZE,
143-
},
144-
};
145-
146-
static struct ndtest_mapping region3_mapping[] = {
147-
{
148-
.dimm = 1,
149-
.start = 0,
150-
.size = DIMM_SIZE,
151-
}
152-
};
153-
154-
static struct ndtest_mapping region4_mapping[] = {
155-
{
156-
.dimm = 2,
157-
.start = 0,
158-
.size = DIMM_SIZE,
159-
}
160-
};
161-
162-
static struct ndtest_mapping region5_mapping[] = {
163-
{
164-
.dimm = 3,
165-
.start = 0,
166-
.size = DIMM_SIZE,
167-
}
168-
};
169-
170137
static struct ndtest_region bus0_regions[] = {
171138
{
172139
.type = ND_DEVICE_NAMESPACE_PMEM,
@@ -182,34 +149,6 @@ static struct ndtest_region bus0_regions[] = {
182149
.size = DIMM_SIZE * 2,
183150
.range_index = 2,
184151
},
185-
{
186-
.type = ND_DEVICE_NAMESPACE_BLK,
187-
.num_mappings = ARRAY_SIZE(region2_mapping),
188-
.mapping = region2_mapping,
189-
.size = DIMM_SIZE,
190-
.range_index = 3,
191-
},
192-
{
193-
.type = ND_DEVICE_NAMESPACE_BLK,
194-
.num_mappings = ARRAY_SIZE(region3_mapping),
195-
.mapping = region3_mapping,
196-
.size = DIMM_SIZE,
197-
.range_index = 4,
198-
},
199-
{
200-
.type = ND_DEVICE_NAMESPACE_BLK,
201-
.num_mappings = ARRAY_SIZE(region4_mapping),
202-
.mapping = region4_mapping,
203-
.size = DIMM_SIZE,
204-
.range_index = 5,
205-
},
206-
{
207-
.type = ND_DEVICE_NAMESPACE_BLK,
208-
.num_mappings = ARRAY_SIZE(region5_mapping),
209-
.mapping = region5_mapping,
210-
.size = DIMM_SIZE,
211-
.range_index = 6,
212-
},
213152
};
214153

215154
static struct ndtest_mapping region6_mapping[] = {
@@ -501,21 +440,6 @@ static int ndtest_create_region(struct ndtest_priv *p,
501440
nd_set->altcookie = nd_set->cookie1;
502441
ndr_desc->nd_set = nd_set;
503442

504-
if (region->type == ND_DEVICE_NAMESPACE_BLK) {
505-
mappings[0].start = 0;
506-
mappings[0].size = DIMM_SIZE;
507-
mappings[0].nvdimm = p->config->dimms[ndimm].nvdimm;
508-
509-
ndr_desc->mapping = &mappings[0];
510-
ndr_desc->num_mappings = 1;
511-
ndr_desc->num_lanes = 1;
512-
ndbr_desc.enable = ndtest_blk_region_enable;
513-
ndbr_desc.do_io = ndtest_blk_do_io;
514-
region->region = nvdimm_blk_region_create(p->bus, ndr_desc);
515-
516-
goto done;
517-
}
518-
519443
for (i = 0; i < region->num_mappings; i++) {
520444
ndimm = region->mapping[i].dimm;
521445
mappings[i].start = region->mapping[i].start;
@@ -527,7 +451,6 @@ static int ndtest_create_region(struct ndtest_priv *p,
527451
ndr_desc->num_mappings = region->num_mappings;
528452
region->region = nvdimm_pmem_region_create(p->bus, ndr_desc);
529453

530-
done:
531454
if (!region->region) {
532455
dev_err(&p->pdev.dev, "Error registering region %pR\n",
533456
ndr_desc->res);

0 commit comments

Comments
 (0)