cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION
Dave Jiang
maintainerPATCH 1/1 cxl: Add dummy function for cxl_memdev_attach_region for !CONFIG_CXL_REGION
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.
https://lore.kernel.org/oe-kbuild-all/[email protected]/
---
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/[email protected]/T/#t
--- drivers/cxl/cxlmem.h | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/cxl/cxlmem.h +7 -0
@@ -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
Signature · 1 line
2.54.0
Quoted 3 lines · Dave Jiang
Add a dummy function that returns
-EOPNOTSUPPforcxl_memdev_attach_regionwhenCONFIG_CXL_REGIONis not enabled. This allow sbuilding whencxl/core/region.oisn'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:
Quoted 6 lines · Dave Jiang
Add a dummy function that returns
-EOPNOTSUPPforcxl_memdev_attach_regionwhenCONFIG_CXL_REGIONis not enabled. This allow sbuilding whencxl/core/region.oisn't built.Reported-by kernel test robot <[email protected]>Fixes 9b1e70e8f9ec ("cxl/region: Introduce devm_cxl_probe_mem()")
Quoted 8 lines
https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by Dave Jiang <[email protected]>---
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/[email protected]/T/#t
Looks good:
Quoted 8 lines · Dave Jiang
Add a dummy function that returns
-EOPNOTSUPPforcxl_memdev_attach_regionwhenCONFIG_CXL_REGIONis not enabled. This allow sbuilding whencxl/core/region.oisn't built.Reported-by kernel test robot <[email protected]>Fixes 9b1e70e8f9ec ("cxl/region: Introduce devm_cxl_probe_mem()")https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by Dave Jiang <[email protected]>
Applied to cxl/next383f69656359
Quoted 31 lines
---
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/[email protected]/T/#t
--- drivers/cxl/cxlmem.h | 7 +++++++ 1 file changed, 7 insertions(+)drivers/cxl/cxlmem.h +7
-0@@ -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