diff mbox series

[1/2] libcxl: Add cxl_memdev_get_firmware_version

Message ID 20221102165004.171776-2-fan.ni@samsung.com
State Accepted
Commit 0ba014e78aea92f1dad4bee81cdc49a216e9d3dd
Headers show
Series Fix some typos | expand

Commit Message

Fan Ni Nov. 2, 2022, 4:50 p.m. UTC
cxl_memdev_get_firmware_verison is a typo and part of the ABI.
Avoid breakage by introducing a stub with the correct name and update
the documentation accordingly.

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Fan Ni <fan.ni@samsung.com>
---
 Documentation/cxl/lib/libcxl.txt | 2 +-
 cxl/libcxl.h                     | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/cxl/lib/libcxl.txt b/Documentation/cxl/lib/libcxl.txt
index fd2962a..edc852d 100644
--- a/Documentation/cxl/lib/libcxl.txt
+++ b/Documentation/cxl/lib/libcxl.txt
@@ -68,7 +68,7 @@  int cxl_memdev_get_major(struct cxl_memdev *memdev);
 int cxl_memdev_get_minor(struct cxl_memdev *memdev);
 unsigned long long cxl_memdev_get_pmem_size(struct cxl_memdev *memdev);
 unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev);
-const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev);
+const char *cxl_memdev_get_firmware_version(struct cxl_memdev *memdev);
 size_t cxl_memdev_get_label_size(struct cxl_memdev *memdev);
 int cxl_memdev_nvdimm_bridge_active(struct cxl_memdev *memdev);
 int cxl_memdev_get_numa_node(struct cxl_memdev *memdev);
diff --git a/cxl/libcxl.h b/cxl/libcxl.h
index 9fe4e99..d097026 100644
--- a/cxl/libcxl.h
+++ b/cxl/libcxl.h
@@ -48,6 +48,14 @@  struct cxl_ctx *cxl_memdev_get_ctx(struct cxl_memdev *memdev);
 unsigned long long cxl_memdev_get_pmem_size(struct cxl_memdev *memdev);
 unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev);
 const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev);
+
+/* ABI spelling mistakes are forever */
+static inline const char *cxl_memdev_get_firmware_version(
+		struct cxl_memdev *memdev)
+{
+	return cxl_memdev_get_firmware_verison(memdev);
+}
+
 size_t cxl_memdev_get_label_size(struct cxl_memdev *memdev);
 int cxl_memdev_disable_invalidate(struct cxl_memdev *memdev);
 int cxl_memdev_enable(struct cxl_memdev *memdev);