mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cxl/region: Fix the return value in devm_cxl_add_region() kernel-doc
@ 2026-09-11 22:17 Karl Mehltretter
  2026-09-11 23:06 ` Jonathan Cameron
  2026-09-12  0:00 ` Dave Jiang
  0 siblings, 2 replies; 3+ messages in thread
From: Karl Mehltretter @ 2026-09-11 22:17 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Dan Williams
  Cc: Karl Mehltretter, Ira Weiny, Li Ming, Ben Widawsky, linux-cxl,
	linux-kernel

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,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-12  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 22:17 [PATCH] cxl/region: Fix the return value in devm_cxl_add_region() kernel-doc Karl Mehltretter
2026-09-11 23:06 ` Jonathan Cameron
2026-09-12  0:00 ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®