From: anisa.su887@gmail.com
To: dan.j.williams@intel.com, ira.weiny@intel.com, dave@stgolabs.net,
linux-cxl@vger.kernel.org
Cc: nifan.cxl@gmail.com, dongjoo.seo1@samsung.com,
Fan Ni <fan.ni@samsung.com>, Anisa Su <anisa.su@samsung.com>
Subject: [RFC PATCH 1/3] core/region: fix return logic for store_targetN
Date: Wed, 3 Dec 2025 20:29:11 +0000 [thread overview]
Message-ID: <20251203203540.1091827-2-anisa.su887@gmail.com> (raw)
In-Reply-To: <20251203203540.1091827-1-anisa.su887@gmail.com>
From: Fan Ni <fan.ni@samsung.com>
Currently, store_targetN attempts to attach_target even if an error
(cxlr->mode is incorrect, DCD is unsupported). Add a goto out statement
to skip any attempt to attach the target on error.
Signed-off-by: Fan Ni <nifan.cxl@gmail.com>
Tested-by: Anisa Su <anisa.su@samsung.com>
Tested-by: Dongjoo Seo <dongjoo.seo1@samsung.com>
---
drivers/cxl/core/region.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index a93979dd345d..adab1f338ee9 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -2258,7 +2258,8 @@ static size_t store_targetN(struct cxl_region *cxlr, const char *buf, int pos,
if (cxlr->mode == CXL_PARTMODE_DYNAMIC_RAM_A &&
!cxl_dcd_supported(cxled_to_mds(cxled))) {
dev_dbg(dev, "DCD unsupported\n");
- return -EINVAL;
+ rc = -EINVAL;
+ goto out;
}
rc = attach_target(cxlr, cxled, pos, TASK_INTERRUPTIBLE);
out:
--
2.51.0
next prev parent reply other threads:[~2025-12-03 20:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 20:29 [RFC PATCH 0/3] Add Support for Multiple DC Regions anisa.su887
2025-12-03 20:29 ` anisa.su887 [this message]
2025-12-04 17:04 ` [RFC PATCH 1/3] core/region: fix return logic for store_targetN Ira Weiny
2025-12-03 20:29 ` [RFC PATCH 2/3] dax/cxl: add existing dc extents when probing dax region anisa.su887
2025-12-03 21:03 ` Anisa Su
2025-12-04 17:29 ` Ira Weiny
2025-12-03 20:29 ` [RFC PATCH 3/3] dcd: Add support for multiple DC regions anisa.su887
2025-12-04 17:44 ` Ira Weiny
2025-12-03 21:19 ` [RFC PATCH 0/3] Add Support for Multiple DC Regions Anisa Su
2025-12-04 17:28 ` Ira Weiny
2025-12-11 21:05 ` Anisa Su
2025-12-12 22:07 ` Ira Weiny
2026-01-12 22:23 ` Anisa Su
2026-01-15 10:28 ` Alireza Sanaee
2026-02-11 1:44 ` Anisa Su
2026-02-11 9:34 ` Alireza Sanaee
2025-12-13 3:36 ` dan.j.williams
2026-01-12 22:50 ` Anisa Su
2026-01-13 0:08 ` Gregory Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251203203540.1091827-2-anisa.su887@gmail.com \
--to=anisa.su887@gmail.com \
--cc=anisa.su@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=dongjoo.seo1@samsung.com \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nifan.cxl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.