Skip to contentSkip to conversation

cxl/lib: remove unimplemented symbol cxl_mapping_get_region

PATCH In review [email protected] 2 participants 2 messages Feb 15, 2025 libnvdimm: non-volatile memory device

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 cxl/lib: remove unimplemented symbol cxl_mapping_get_region

From: Alison Schofield <[email protected]>

User reports this symbol was added but has never had an implementation causing their linker ld.lld to fail like so:

ld.lld: error: version script assignment of 'LIBCXL_3' to symbol 'cxl_mapping_get_region' failed: symbol not defined

This likely worked for some builds but not others because of different toolchains (linkers), compiler optimizations (garbage collection), or linker flags (ignoring or only warning on unused symbols).

Clean this up by removing the symbol.

Reposted here from github pull request:
https://github.com/pmem/ndctl/pull/267/

---
 cxl/lib/libcxl.sym | 1 -
 cxl/libcxl.h       | 1 -
 2 files changed, 2 deletions(-)
cxl/lib/libcxl.sym +0 -1
index 0c155a40ad47..763151fbef59 100644
@@ -208,7 +208,6 @@ global:
 	cxl_mapping_get_first;
 	cxl_mapping_get_next;
 	cxl_mapping_get_decoder;
-	cxl_mapping_get_region;
 	cxl_mapping_get_position;
 	cxl_decoder_get_by_name;
 	cxl_decoder_get_memdev;
cxl/libcxl.h +0 -1
index 0a5fd0e13cc2..43c082acd836 100644
@@ -354,7 +354,6 @@ struct cxl_memdev_mapping *cxl_mapping_get_first(struct cxl_region *region);
 struct cxl_memdev_mapping *
 cxl_mapping_get_next(struct cxl_memdev_mapping *mapping);
 struct cxl_decoder *cxl_mapping_get_decoder(struct cxl_memdev_mapping *mapping);
-struct cxl_region *cxl_mapping_get_region(struct cxl_memdev_mapping *mapping);
 unsigned int cxl_mapping_get_position(struct cxl_memdev_mapping *mapping);
 
 #define cxl_mapping_foreach(region, mapping) \
Signature · 1 line
2.37.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · On Fri, Feb 14, 2025 at 06:13:16PM -0800, [email protected] wrote:

From: Alison Schofield <[email protected]>

User reports this symbol was added but has never had an implementation causing their linker ld.lld to fail like so:

ld.lld: error: version script assignment of 'LIBCXL_3' to symbol 'cxl_mapping_get_region' failed: symbol not defined

This likely worked for some builds but not others because of different toolchains (linkers), compiler optimizations (garbage collection), or linker flags (ignoring or only warning on unused symbols).

Quoted 6 lines

Clean this up by removing the symbol.

Reposted here from github pull request:
https://github.com/pmem/ndctl/pull/267/

Quoted 32 lines
---
 cxl/lib/libcxl.sym | 1 -
 cxl/libcxl.h       | 1 -
 2 files changed, 2 deletions(-)
cxl/lib/libcxl.sym +0 -1
index 0c155a40ad47..763151fbef59 100644
@@ -208,7 +208,6 @@ global:
 	cxl_mapping_get_first;
 	cxl_mapping_get_next;
 	cxl_mapping_get_decoder;
-	cxl_mapping_get_region;
 	cxl_mapping_get_position;
 	cxl_decoder_get_by_name;
 	cxl_decoder_get_memdev;
cxl/libcxl.h +0 -1
index 0a5fd0e13cc2..43c082acd836 100644
@@ -354,7 +354,6 @@ struct cxl_memdev_mapping *cxl_mapping_get_first(struct cxl_region *region);
 struct cxl_memdev_mapping *
 cxl_mapping_get_next(struct cxl_memdev_mapping *mapping);
 struct cxl_decoder *cxl_mapping_get_decoder(struct cxl_memdev_mapping *mapping);
-struct cxl_region *cxl_mapping_get_region(struct cxl_memdev_mapping *mapping);
 unsigned int cxl_mapping_get_position(struct cxl_memdev_mapping *mapping);
 
 #define cxl_mapping_foreach(region, mapping) \
Signature · 1 line
2.37.3