Linux CXL
 help / color / mirror / Atom feed
From: alison.schofield@intel.com
To: nvdimm@lists.linux.dev
Cc: Alison Schofield <alison.schofield@intel.com>, linux-cxl@vger.kernel.org
Subject: [ndctl PATCH] cxl/lib: remove unimplemented symbol cxl_mapping_get_region
Date: Fri, 14 Feb 2025 18:13:16 -0800	[thread overview]
Message-ID: <20250215021319.1948097-1-alison.schofield@intel.com> (raw)

From: Alison Schofield <alison.schofield@intel.com>

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/

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
---
 cxl/lib/libcxl.sym | 1 -
 cxl/libcxl.h       | 1 -
 2 files changed, 2 deletions(-)

diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
index 0c155a40ad47..763151fbef59 100644
--- a/cxl/lib/libcxl.sym
+++ b/cxl/lib/libcxl.sym
@@ -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;
diff --git a/cxl/libcxl.h b/cxl/libcxl.h
index 0a5fd0e13cc2..43c082acd836 100644
--- a/cxl/libcxl.h
+++ b/cxl/libcxl.h
@@ -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) \
-- 
2.37.3


             reply	other threads:[~2025-02-15  2:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15  2:13 alison.schofield [this message]
2025-02-15  5:31 ` [ndctl PATCH] cxl/lib: remove unimplemented symbol cxl_mapping_get_region Fan Ni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250215021319.1948097-1-alison.schofield@intel.com \
    --to=alison.schofield@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox