Skip to contentSkip to conversation

cxl: clean up and fix typos

PATCH In review Minwoo Im 2 participants 7 messages May 9, 2023

Subsystems (2)
lore
Share & tools
lore

Minwoo Im

author
#0 lore raw

cover cxl: clean up and fix typos

Hello,

Looking around QEMU-based emulated CXL device with ndctl, I've found some miscs to fix up including typo and removal of some redundant funciton name in a log.

Please review.
Thanks,

Minwoo Im (3):
cxl/list: Fix typo in cxl-list documentation
cxl: region: remove redundant func name from error
cxl: fix changed function name in a comment

 Documentation/cxl/cxl-list.txt | 10 +++++-----
 cxl/region.c                   |  5 +++--
 2 files changed, 8 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/3 cxl/list: Fix typo in cxl-list documentation

s/the returned the returned object/the returned object s/ellided/elided
s/hierararchy/hierarchy
s/specifed/specified
s/identidier/identifier
s/scenerios/scenarios

---
 Documentation/cxl/cxl-list.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/cxl/cxl-list.txt +5 -5
index c64d65d3ffbe..838de4086678 100644
@@ -18,9 +18,9 @@ instances along with some of their major attributes.
 Options can be specified to limit the output to specific objects. When a
 single object type is specified the return json object is an array of
 just those objects, when multiple objects types are specified the
-returned the returned object may be an array of arrays with the inner
-array named for the given object type. The top-level arrays are ellided
-when the objects can nest under a higher object-type in the hierararchy.
+returned object may be an array of arrays with the inner
+array named for the given object type. The top-level arrays are elided
+when the objects can nest under a higher object-type in the hierarchy.
 The potential top-level array names and their nesting properties are:
 
 "anon memdevs":: (disabled memory devices) do not nest
@@ -34,7 +34,7 @@ The potential top-level array names and their nesting properties are:
 "endpoint decoders":: nest under endpoints, or ports (if endpoints are
    not emitted) or buses (if endpoints and ports are not emitted)
 
-Filters can by specifed as either a single identidier, a space separated
+Filters can be specified as either a single identifier, a space separated
 quoted string, or a comma separated list. When multiple filter
 identifiers are specified within a filter string, like "-m
 mem0,mem1,mem2", they are combined as an 'OR' filter.  When multiple
@@ -263,7 +263,7 @@ OPTIONS
 --buses::
 	Include 'bus' / CXL root object(s) in the listing. Typically, on ACPI
 	systems the bus object is a singleton associated with the ACPI0017
-	device, but there are test scenerios where there may be multiple CXL
+	device, but there are test scenarios where there may be multiple CXL
 	memory hierarchies.
 ----
 # cxl list -B
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH 2/3 cxl: region: remove redundant func name from error

In reply to Minwoo Im

If user does not provide -s, --size option and there's no ep_min_size configured, it prints error log like the following. This patch removes redundant repeated function name from the log.

Before:

  root@vm:~/work# cxl create-region -m -d decoder0.0 -w 1 -g 1024 mem0
  cxl region: create_region: create_region: unable to determine region size
  cxl region: cmd_create_region: created 0 regions

After:

  root@vm:~/work# cxl create-region -m -d decoder0.0 -w 1 -g 1024 mem0
  cxl region: create_region: unable to determine region size
  cxl region: cmd_create_region: created 0 regions
---
 cxl/region.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
cxl/region.c +2 -1
index 07ce4a319fd0..71f152d9e5a5 100644
@@ -607,7 +607,8 @@ static int create_region(struct cxl_ctx *ctx, int *count,
 	} else if (p->ep_min_size) {
 		size = p->ep_min_size * p->ways;
 	} else {
-		log_err(&rl, "%s: unable to determine region size\n", __func__);
+		log_err(&rl, "unable to determine region size\n");
+
 		return -ENXIO;
 	}
 	max_extent = cxl_decoder_get_max_available_extent(p->root_decoder);
Signature · 1 line
2.34.1
author
#5 lore raw

PATCH 3/3 cxl: fix changed function name in a comment

In reply to Minwoo Im

cxl_memdev_target_find_decoder() has been renamed to cxl_memdev_find_decoder in Commit 21b089025178 ("cxl: add a 'create-region' command"). Fix function name in a comment.

---
 cxl/region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cxl/region.c +1 -1
index 71f152d9e5a5..45f0c6a3771c 100644
@@ -676,7 +676,7 @@ static int create_region(struct cxl_ctx *ctx, int *count,
 		}
 		if (cxl_decoder_get_mode(ep_decoder) != p->mode) {
 			/*
-			 * The memdev_target_find_decoder() helper returns a free
+			 * The cxl_memdev_find_decoder() helper returns a free
 			 * decoder whose size has been checked for 0.
 			 * Thus it is safe to change the mode here if needed.
 			 */
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/3
#2 lore raw

Re: [ndctl PATCH 1/3] cxl/list: Fix typo in cxl-list documentation

In reply to Minwoo Im
Quoted 8 lines · Minwoo Im

s/the returned the returned object/the returned object s/ellided/elided
s/hierararchy/hierarchy
s/specifed/specified
s/identidier/identifier
s/scenerios/scenarios

Quoted 39 lines
---
  Documentation/cxl/cxl-list.txt | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/cxl/cxl-list.txt +5 -5
index c64d65d3ffbe..838de4086678 100644
@@ -18,9 +18,9 @@ instances along with some of their major attributes.
  Options can be specified to limit the output to specific objects. When a
  single object type is specified the return json object is an array of
  just those objects, when multiple objects types are specified the
-returned the returned object may be an array of arrays with the inner
-array named for the given object type. The top-level arrays are ellided
-when the objects can nest under a higher object-type in the hierararchy.
+returned object may be an array of arrays with the inner
+array named for the given object type. The top-level arrays are elided
+when the objects can nest under a higher object-type in the hierarchy.
  The potential top-level array names and their nesting properties are:
 
  "anon memdevs":: (disabled memory devices) do not nest
@@ -34,7 +34,7 @@ The potential top-level array names and their nesting properties are:
  "endpoint decoders":: nest under endpoints, or ports (if endpoints are
     not emitted) or buses (if endpoints and ports are not emitted)
 
-Filters can by specifed as either a single identidier, a space separated
+Filters can be specified as either a single identifier, a space separated
  quoted string, or a comma separated list. When multiple filter
  identifiers are specified within a filter string, like "-m
  mem0,mem1,mem2", they are combined as an 'OR' filter.  When multiple
@@ -263,7 +263,7 @@ OPTIONS
  --buses::
  	Include 'bus' / CXL root object(s) in the listing. Typically, on ACPI
  	systems the bus object is a singleton associated with the ACPI0017
-	device, but there are test scenerios where there may be multiple CXL
+	device, but there are test scenarios where there may be multiple CXL
  	memory hierarchies.
  ----
  # cxl list -B
maintainer Reviewed-by on v1 2/3
#4 lore raw

Re: [ndctl PATCH 2/3] cxl: region: remove redundant func name from error

In reply to Minwoo Im
Quoted 10 lines · Minwoo Im

If user does not provide -s, --size option and there's no ep_min_size configured, it prints error log like the following. This patch removes redundant repeated function name from the log.

Before:

   root@vm:~/work# cxl create-region -m -d decoder0.0 -w 1 -g 1024 mem0
   cxl region: create_region: create_region: unable to determine region size
   cxl region: cmd_create_region: created 0 regions
Quoted 6 lines

After:

   root@vm:~/work# cxl create-region -m -d decoder0.0 -w 1 -g 1024 mem0
   cxl region: create_region: unable to determine region size
   cxl region: cmd_create_region: created 0 regions
Quoted 18 lines
---
  cxl/region.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
cxl/region.c +2 -1
index 07ce4a319fd0..71f152d9e5a5 100644
@@ -607,7 +607,8 @@ static int create_region(struct cxl_ctx *ctx, int *count,
  	} else if (p->ep_min_size) {
  		size = p->ep_min_size * p->ways;
  	} else {
-		log_err(&rl, "%s: unable to determine region size\n", __func__);
+		log_err(&rl, "unable to determine region size\n");
+
  		return -ENXIO;
  	}
  	max_extent = cxl_decoder_get_max_available_extent(p->root_decoder);
maintainer Reviewed-by on v1 3/3
#6 lore raw

Re: [ndctl PATCH 3/3] cxl: fix changed function name in a comment

In reply to Minwoo Im
Quoted 5 lines · Minwoo Im

cxl_memdev_target_find_decoder() has been renamed to cxl_memdev_find_decoder in Commit 21b089025178 ("cxl: add a 'create-region' command"). Fix function name in a comment.

Quoted 17 lines
---
  cxl/region.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
cxl/region.c +1 -1
index 71f152d9e5a5..45f0c6a3771c 100644
@@ -676,7 +676,7 @@ static int create_region(struct cxl_ctx *ctx, int *count,
  		}
  		if (cxl_decoder_get_mode(ep_decoder) != p->mode) {
  			/*
-			 * The memdev_target_find_decoder() helper returns a free
+			 * The cxl_memdev_find_decoder() helper returns a free
  			 * decoder whose size has been checked for 0.
  			 * Thus it is safe to change the mode here if needed.
  			 */