Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'cxl-fixes-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Dave Jiang:

- Compile fix for cxl-test from missing linux/vmalloc.h

- Fix for memregion leaks in devm_cxl_add_region()

* tag 'cxl-fixes-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
cxl/region: Fix memregion leaks in devm_cxl_add_region()
cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c

+10 -9
+9 -9
drivers/cxl/core/region.c
··· 2352 2352 struct device *dev; 2353 2353 int rc; 2354 2354 2355 - switch (mode) { 2356 - case CXL_DECODER_RAM: 2357 - case CXL_DECODER_PMEM: 2358 - break; 2359 - default: 2360 - dev_err(&cxlrd->cxlsd.cxld.dev, "unsupported mode %d\n", mode); 2361 - return ERR_PTR(-EINVAL); 2362 - } 2363 - 2364 2355 cxlr = cxl_region_alloc(cxlrd, id); 2365 2356 if (IS_ERR(cxlr)) 2366 2357 return cxlr; ··· 2405 2414 enum cxl_decoder_mode mode, int id) 2406 2415 { 2407 2416 int rc; 2417 + 2418 + switch (mode) { 2419 + case CXL_DECODER_RAM: 2420 + case CXL_DECODER_PMEM: 2421 + break; 2422 + default: 2423 + dev_err(&cxlrd->cxlsd.cxld.dev, "unsupported mode %d\n", mode); 2424 + return ERR_PTR(-EINVAL); 2425 + } 2408 2426 2409 2427 rc = memregion_alloc(GFP_KERNEL); 2410 2428 if (rc < 0)
+1
tools/testing/cxl/test/mem.c
··· 3 3 4 4 #include <linux/platform_device.h> 5 5 #include <linux/mod_devicetable.h> 6 + #include <linux/vmalloc.h> 6 7 #include <linux/module.h> 7 8 #include <linux/delay.h> 8 9 #include <linux/sizes.h>