cxl: clean up and fix typos
Subsystems (2)
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
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
@@ -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
PATCH 2/3 cxl: region: remove redundant func name from error
In reply to Minwoo ImIf 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
@@ -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
PATCH 3/3 cxl: fix changed function name in a comment
In reply to Minwoo Imcxl_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
@@ -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
Re: [ndctl PATCH 1/3] cxl/list: Fix typo in cxl-list documentation
In reply to Minwoo ImQuoted 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/scenariosSigned-off-by Minwoo Im <[email protected]>
Quoted 39 lines
--- Documentation/cxl/cxl-list.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)Documentation/cxl/cxl-list.txt +5
-5@@ -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
Re: [ndctl PATCH 2/3] cxl: region: remove redundant func name from error
In reply to Minwoo ImQuoted 10 lines · Minwoo Im
If user does not provide
-s, --sizeoption and there's noep_min_sizeconfigured, 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 regionsSigned-off-by Minwoo Im <[email protected]>
Quoted 18 lines
--- cxl/region.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)cxl/region.c +2
-1@@ -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);
Re: [ndctl PATCH 3/3] cxl: fix changed function name in a comment
In reply to Minwoo ImQuoted 5 lines · Minwoo Im
cxl_memdev_target_find_decoder()has been renamed tocxl_memdev_find_decoderin Commit21b089025178("cxl: add a 'create-region' command"). Fix function name in a comment.Signed-off-by Minwoo Im <[email protected]>
Quoted 17 lines
--- cxl/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cxl/region.c +1
-1@@ -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. */