drivers/cxl/core/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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.
Fixes: 779dd20cfb56 ("cxl/region: Add region creation support")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
drivers/cxl/core/region.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 27e63e6dab7c82ccd6c34b7955f52789a32ce478..28a8e3d1e1231eef40bc30cdd937af980952232c 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -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,
On 9/11/26 3:17 PM, Karl Mehltretter wrote:
> 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.
>
> Fixes: 779dd20cfb56 ("cxl/region: Add region creation support")
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Dropped fixes tag since it's just a comment fix and not code bug.
Applied to cxl/next
2dfb4796d19b
> ---
> drivers/cxl/core/region.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index 27e63e6dab7c82ccd6c34b7955f52789a32ce478..28a8e3d1e1231eef40bc30cdd937af980952232c 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -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,
On Sat, 12 Sep 2026 00:17:48 +0200
Karl Mehltretter <kmehltretter@gmail.com> wrote:
> 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.
>
> Fixes: 779dd20cfb56 ("cxl/region: Add region creation support")
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
© 2016 - 2026 Red Hat, Inc.