cxl/region: Fix the return value in devm_cxl_add_region() kernel-doc
PATCH 1/1 cxl/region: Fix the return value in devm_cxl_add_region() kernel-doc
devm_cxl_add_region() returns the new struct cxl_region, or an ERR_PTR() on failure, but its kernel-doc says "0 if the region was added to the @cxlrd, else returns negative error code", which was never true. Describe the pointer.
--- drivers/cxl/core/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/core/region.c +1 -1
@@ -2727,7 +2727,7 @@ void kill_regions(struct cxl_root_decoder *cxlrd)* This is the second step of region initialization. Regions exist within an * address space which is mapped by a @cxlrd. * -* Return: 0 if the region was added to the @cxlrd, else returns negative error +* Return: the new region if it was added to the @cxlrd, else an ERR_PTR() with the error * code. The region will be named "regionZ" where Z is the unique region number. */ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
Quoted 8 lines · On Sat, 12 Sep 2026 00:17:48 +0200 Karl Mehltretter <[email protected]>…
devm_cxl_add_region()returns the new structcxl_region, or anERR_PTR()on failure, but its kernel-doc says "0 if the region was added to the @cxlrd, else returns negative error code", which was never true. Describe the pointer.Fixes 779dd20cfb56 ("cxl/region: Add region creation support")Assisted-by LLMSigned-off-by Karl Mehltretter <[email protected]>
Quoted 8 lines · Karl Mehltretter
devm_cxl_add_region()returns the new structcxl_region, or anERR_PTR()on failure, but its kernel-doc says "0 if the region was added to the @cxlrd, else returns negative error code", which was never true. Describe the pointer.Fixes 779dd20cfb56 ("cxl/region: Add region creation support")Assisted-by LLMSigned-off-by Karl Mehltretter <[email protected]>
Dropped fixes tag since it's just a comment fix and not code bug.
Applied to cxl/next2dfb4796d19b
Quoted 17 lines
--- drivers/cxl/core/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/core/region.c +1
-1@@ -2727,7 +2727,7 @@ void kill_regions(struct cxl_root_decoder *cxlrd)* This is the second step of region initialization. Regions exist within an * address space which is mapped by a @cxlrd. * -* Return: 0 if the region was added to the @cxlrd, else returns negative error +* Return: the new region if it was added to the @cxlrd, else an ERR_PTR() with the error * code. The region will be named "regionZ" where Z is the unique region number. */ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,