* [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION
@ 2026-06-10 0:13 Dave Jiang
2026-06-10 17:25 ` Alison Schofield
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dave Jiang @ 2026-06-10 0:13 UTC (permalink / raw)
To: linux-cxl; +Cc: djbw, kernel test robot
Add a dummy function that returns -EOPNOTSUPP for cxl_memdev_attach_region
when CONFIG_CXL_REGION is not enabled. This allow sbuilding when
cxl/core/region.o isn't built.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 9b1e70e8f9ec ("cxl/region: Introduce devm_cxl_probe_mem()")
https://lore.kernel.org/oe-kbuild-all/202606100401.GOjzpKHo-lkp@intel.com/
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
Fix is against last patch of Dan's [1] series for Introduce
devm_cxl_probe_mem() and fix region deletion.
[1]: https://lore.kernel.org/linux-cxl/48834616-6e75-4936-89be-9224a6dedefa@intel.com/T/#t
---
drivers/cxl/cxlmem.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index d3bdd00f94b3..ed419d0c59f2 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -115,7 +115,14 @@ struct cxl_attach_region {
struct range hpa_range;
};
+#ifdef CONFIG_CXL_REGION
int cxl_memdev_attach_region(struct cxl_memdev *cxlmd);
+#else
+static inline int cxl_memdev_attach_region(struct cxl_memdev *cxlmd)
+{
+ return -EOPNOTSUPP;
+}
+#endif
struct cxl_memdev *devm_cxl_add_classdev(struct cxl_dev_state *cxlds);
struct cxl_memdev *__devm_cxl_add_memdev(struct cxl_dev_state *cxlds,
base-commit: 9b1e70e8f9ec4b5c6ce7fa774a0023bb6894c686
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION
2026-06-10 0:13 [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION Dave Jiang
@ 2026-06-10 17:25 ` Alison Schofield
2026-06-12 20:18 ` Dan Williams (nvidia)
2026-06-12 20:52 ` Dave Jiang
2 siblings, 0 replies; 4+ messages in thread
From: Alison Schofield @ 2026-06-10 17:25 UTC (permalink / raw)
To: Dave Jiang; +Cc: linux-cxl, djbw, kernel test robot
On Tue, Jun 09, 2026 at 05:13:24PM -0700, Dave Jiang wrote:
> Add a dummy function that returns -EOPNOTSUPP for cxl_memdev_attach_region
> when CONFIG_CXL_REGION is not enabled. This allow sbuilding when
> cxl/core/region.o isn't built.
Thought above could be more explicit about what it allows building.
Something like: 'This allows building cxl/core/memdev.o when ....'
With or without a commit log update:
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION
2026-06-10 0:13 [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION Dave Jiang
2026-06-10 17:25 ` Alison Schofield
@ 2026-06-12 20:18 ` Dan Williams (nvidia)
2026-06-12 20:52 ` Dave Jiang
2 siblings, 0 replies; 4+ messages in thread
From: Dan Williams (nvidia) @ 2026-06-12 20:18 UTC (permalink / raw)
To: Dave Jiang, linux-cxl; +Cc: djbw, kernel test robot
Dave Jiang wrote:
> Add a dummy function that returns -EOPNOTSUPP for cxl_memdev_attach_region
> when CONFIG_CXL_REGION is not enabled. This allow sbuilding when
> cxl/core/region.o isn't built.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 9b1e70e8f9ec ("cxl/region: Introduce devm_cxl_probe_mem()")
> https://lore.kernel.org/oe-kbuild-all/202606100401.GOjzpKHo-lkp@intel.com/
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
>
> Fix is against last patch of Dan's [1] series for Introduce
> devm_cxl_probe_mem() and fix region deletion.
>
> [1]: https://lore.kernel.org/linux-cxl/48834616-6e75-4936-89be-9224a6dedefa@intel.com/T/#t
Looks good:
Reviewed-by: Dan Williams <djbw@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION
2026-06-10 0:13 [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION Dave Jiang
2026-06-10 17:25 ` Alison Schofield
2026-06-12 20:18 ` Dan Williams (nvidia)
@ 2026-06-12 20:52 ` Dave Jiang
2 siblings, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2026-06-12 20:52 UTC (permalink / raw)
To: linux-cxl; +Cc: djbw, kernel test robot
On 6/9/26 5:13 PM, Dave Jiang wrote:
> Add a dummy function that returns -EOPNOTSUPP for cxl_memdev_attach_region
> when CONFIG_CXL_REGION is not enabled. This allow sbuilding when
> cxl/core/region.o isn't built.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 9b1e70e8f9ec ("cxl/region: Introduce devm_cxl_probe_mem()")
> https://lore.kernel.org/oe-kbuild-all/202606100401.GOjzpKHo-lkp@intel.com/
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Applied to cxl/next
383f69656359
> ---
>
> Fix is against last patch of Dan's [1] series for Introduce
> devm_cxl_probe_mem() and fix region deletion.
>
> [1]: https://lore.kernel.org/linux-cxl/48834616-6e75-4936-89be-9224a6dedefa@intel.com/T/#t
> ---
> drivers/cxl/cxlmem.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
> index d3bdd00f94b3..ed419d0c59f2 100644
> --- a/drivers/cxl/cxlmem.h
> +++ b/drivers/cxl/cxlmem.h
> @@ -115,7 +115,14 @@ struct cxl_attach_region {
> struct range hpa_range;
> };
>
> +#ifdef CONFIG_CXL_REGION
> int cxl_memdev_attach_region(struct cxl_memdev *cxlmd);
> +#else
> +static inline int cxl_memdev_attach_region(struct cxl_memdev *cxlmd)
> +{
> + return -EOPNOTSUPP;
> +}
> +#endif
>
> struct cxl_memdev *devm_cxl_add_classdev(struct cxl_dev_state *cxlds);
> struct cxl_memdev *__devm_cxl_add_memdev(struct cxl_dev_state *cxlds,
>
> base-commit: 9b1e70e8f9ec4b5c6ce7fa774a0023bb6894c686
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-12 20:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 0:13 [PATCH] cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION Dave Jiang
2026-06-10 17:25 ` Alison Schofield
2026-06-12 20:18 ` Dan Williams (nvidia)
2026-06-12 20:52 ` Dave Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox