diff mbox series

[ndctl] cxl: Fix some naming typos

Message ID 20221028175752.27879-1-fan.ni@samsung.com
State New, archived
Headers show
Series [ndctl] cxl: Fix some naming typos | expand

Commit Message

Fan Ni Oct. 28, 2022, 5:59 p.m. UTC
The function for retrieving firmware version is named
`cxl_memdev_get_firmware_verison`, updated to `cxl_memdev_get_firmware_version'.

Signed-off-by: Fan Ni <fan.ni@samsung.com>
---
 Documentation/cxl/lib/libcxl.txt | 2 +-
 cxl/lib/libcxl.c                 | 2 +-
 cxl/lib/libcxl.sym               | 2 +-
 cxl/libcxl.h                     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Comments

Verma, Vishal L Oct. 28, 2022, 7:45 p.m. UTC | #1
On Fri, 2022-10-28 at 17:59 +0000, Fan Ni wrote:
> The function for retrieving firmware version is named
> `cxl_memdev_get_firmware_verison`, updated to `cxl_memdev_get_firmware_version'.
> 
> Signed-off-by: Fan Ni <fan.ni@samsung.com>
> ---
>  Documentation/cxl/lib/libcxl.txt | 2 +-
>  cxl/lib/libcxl.c                 | 2 +-
>  cxl/lib/libcxl.sym               | 2 +-
>  cxl/libcxl.h                     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

Hi Fan,

Thanks for catching this. However since the typo is in an exported API,
we can't simply change it to the right spelling, as that would break
library compatibility, cause an soname bump (which we try to avoid).

A solution would be to /add/ the fixed spelling version of the api
alongside the misspelled one. Would you like to take a crack at doing
that instead?

Note that for the new API, the libcxl.sym addition will need to go into
a new section at the bottom instead of alongside the old one.

> 
> 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/lib/libcxl.c b/cxl/lib/libcxl.c
> index e8c5d44..b7ad263 100644
> --- a/cxl/lib/libcxl.c
> +++ b/cxl/lib/libcxl.c
> @@ -1262,7 +1262,7 @@ CXL_EXPORT unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev)
>         return memdev->ram_size;
>  }
>  
> -CXL_EXPORT const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev)
> +CXL_EXPORT const char *cxl_memdev_get_firmware_version(struct cxl_memdev *memdev)
>  {
>         return memdev->firmware_version;
>  }
> diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
> index 8bb91e0..febbca6 100644
> --- a/cxl/lib/libcxl.sym
> +++ b/cxl/lib/libcxl.sym
> @@ -19,7 +19,7 @@ global:
>         cxl_memdev_get_ctx;
>         cxl_memdev_get_pmem_size;
>         cxl_memdev_get_ram_size;
> -       cxl_memdev_get_firmware_verison;
> +       cxl_memdev_get_firmware_version;
>         cxl_cmd_get_devname;
>         cxl_cmd_new_raw;
>         cxl_cmd_set_input_payload;
> diff --git a/cxl/libcxl.h b/cxl/libcxl.h
> index 9fe4e99..c3c99b8 100644
> --- a/cxl/libcxl.h
> +++ b/cxl/libcxl.h
> @@ -47,7 +47,7 @@ int cxl_memdev_get_minor(struct cxl_memdev *memdev);
>  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);
> +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_disable_invalidate(struct cxl_memdev *memdev);
>  int cxl_memdev_enable(struct cxl_memdev *memdev);
Fan Ni Oct. 28, 2022, 8:05 p.m. UTC | #2
On Fri, Oct 28, 2022 at 07:45:42PM +0000, Verma, Vishal L wrote:

> On Fri, 2022-10-28 at 17:59 +0000, Fan Ni wrote:
> > The function for retrieving firmware version is named
> > `cxl_memdev_get_firmware_verison`, updated to `cxl_memdev_get_firmware_version'.
> > 
> > Signed-off-by: Fan Ni <fan.ni@samsung.com>
> > ---
> >  Documentation/cxl/lib/libcxl.txt | 2 +-
> >  cxl/lib/libcxl.c                 | 2 +-
> >  cxl/lib/libcxl.sym               | 2 +-
> >  cxl/libcxl.h                     | 2 +-
> >  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> Hi Fan,
> 
> Thanks for catching this. However since the typo is in an exported API,
> we can't simply change it to the right spelling, as that would break
> library compatibility, cause an soname bump (which we try to avoid).
> 
> A solution would be to /add/ the fixed spelling version of the api
> alongside the misspelled one. Would you like to take a crack at doing
> that instead?
> 
> Note that for the new API, the libcxl.sym addition will need to go into
> a new section at the bottom instead of alongside the old one.
> 

Sure. I will fix as you suggested and send out a new patch for review.
Thanks.

> > 
> > 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/lib/libcxl.c b/cxl/lib/libcxl.c
> > index e8c5d44..b7ad263 100644
> > --- a/cxl/lib/libcxl.c
> > +++ b/cxl/lib/libcxl.c
> > @@ -1262,7 +1262,7 @@ CXL_EXPORT unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev)
> >         return memdev->ram_size;
> >  }
> >  
> > -CXL_EXPORT const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev)
> > +CXL_EXPORT const char *cxl_memdev_get_firmware_version(struct cxl_memdev *memdev)
> >  {
> >         return memdev->firmware_version;
> >  }
> > diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
> > index 8bb91e0..febbca6 100644
> > --- a/cxl/lib/libcxl.sym
> > +++ b/cxl/lib/libcxl.sym
> > @@ -19,7 +19,7 @@ global:
> >         cxl_memdev_get_ctx;
> >         cxl_memdev_get_pmem_size;
> >         cxl_memdev_get_ram_size;
> > -       cxl_memdev_get_firmware_verison;
> > +       cxl_memdev_get_firmware_version;
> >         cxl_cmd_get_devname;
> >         cxl_cmd_new_raw;
> >         cxl_cmd_set_input_payload;
> > diff --git a/cxl/libcxl.h b/cxl/libcxl.h
> > index 9fe4e99..c3c99b8 100644
> > --- a/cxl/libcxl.h
> > +++ b/cxl/libcxl.h
> > @@ -47,7 +47,7 @@ int cxl_memdev_get_minor(struct cxl_memdev *memdev);
> >  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);
> > +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_disable_invalidate(struct cxl_memdev *memdev);
> >  int cxl_memdev_enable(struct cxl_memdev *memdev);
>
Gupta, Pankaj Nov. 1, 2022, 5:23 a.m. UTC | #3
> The function for retrieving firmware version is named
> `cxl_memdev_get_firmware_verison`, updated to `cxl_memdev_get_firmware_version'.
> 
> Signed-off-by: Fan Ni <fan.ni@samsung.com>
> ---
>   Documentation/cxl/lib/libcxl.txt | 2 +-
>   cxl/lib/libcxl.c                 | 2 +-
>   cxl/lib/libcxl.sym               | 2 +-
>   cxl/libcxl.h                     | 2 +-
>   4 files changed, 4 insertions(+), 4 deletions(-)
> 
> 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/lib/libcxl.c b/cxl/lib/libcxl.c
> index e8c5d44..b7ad263 100644
> --- a/cxl/lib/libcxl.c
> +++ b/cxl/lib/libcxl.c
> @@ -1262,7 +1262,7 @@ CXL_EXPORT unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev)
>   	return memdev->ram_size;
>   }
>   
> -CXL_EXPORT const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev)
> +CXL_EXPORT const char *cxl_memdev_get_firmware_version(struct cxl_memdev *memdev)
>   {
>   	return memdev->firmware_version;
>   }
> diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
> index 8bb91e0..febbca6 100644
> --- a/cxl/lib/libcxl.sym
> +++ b/cxl/lib/libcxl.sym
> @@ -19,7 +19,7 @@ global:
>   	cxl_memdev_get_ctx;
>   	cxl_memdev_get_pmem_size;
>   	cxl_memdev_get_ram_size;
> -	cxl_memdev_get_firmware_verison;
> +	cxl_memdev_get_firmware_version;
>   	cxl_cmd_get_devname;
>   	cxl_cmd_new_raw;
>   	cxl_cmd_set_input_payload;
> diff --git a/cxl/libcxl.h b/cxl/libcxl.h
> index 9fe4e99..c3c99b8 100644
> --- a/cxl/libcxl.h
> +++ b/cxl/libcxl.h
> @@ -47,7 +47,7 @@ int cxl_memdev_get_minor(struct cxl_memdev *memdev);
>   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);
> +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_disable_invalidate(struct cxl_memdev *memdev);
>   int cxl_memdev_enable(struct cxl_memdev *memdev);

Hard to find typo with naked eyes.

Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
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/lib/libcxl.c b/cxl/lib/libcxl.c
index e8c5d44..b7ad263 100644
--- a/cxl/lib/libcxl.c
+++ b/cxl/lib/libcxl.c
@@ -1262,7 +1262,7 @@  CXL_EXPORT unsigned long long cxl_memdev_get_ram_size(struct cxl_memdev *memdev)
 	return memdev->ram_size;
 }
 
-CXL_EXPORT const char *cxl_memdev_get_firmware_verison(struct cxl_memdev *memdev)
+CXL_EXPORT const char *cxl_memdev_get_firmware_version(struct cxl_memdev *memdev)
 {
 	return memdev->firmware_version;
 }
diff --git a/cxl/lib/libcxl.sym b/cxl/lib/libcxl.sym
index 8bb91e0..febbca6 100644
--- a/cxl/lib/libcxl.sym
+++ b/cxl/lib/libcxl.sym
@@ -19,7 +19,7 @@  global:
 	cxl_memdev_get_ctx;
 	cxl_memdev_get_pmem_size;
 	cxl_memdev_get_ram_size;
-	cxl_memdev_get_firmware_verison;
+	cxl_memdev_get_firmware_version;
 	cxl_cmd_get_devname;
 	cxl_cmd_new_raw;
 	cxl_cmd_set_input_payload;
diff --git a/cxl/libcxl.h b/cxl/libcxl.h
index 9fe4e99..c3c99b8 100644
--- a/cxl/libcxl.h
+++ b/cxl/libcxl.h
@@ -47,7 +47,7 @@  int cxl_memdev_get_minor(struct cxl_memdev *memdev);
 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);
+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_disable_invalidate(struct cxl_memdev *memdev);
 int cxl_memdev_enable(struct cxl_memdev *memdev);