* [PATCH] cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c
@ 2024-05-28 22:55 Dave Jiang
2024-05-28 23:02 ` Dan Williams
2024-05-28 23:03 ` Alison Schofield
0 siblings, 2 replies; 3+ messages in thread
From: Dave Jiang @ 2024-05-28 22:55 UTC (permalink / raw)
To: linux-cxl
Cc: dan.j.williams, ira.weiny, vishal.l.verma, alison.schofield,
Jonathan.Cameron, dave
tools/testing/cxl/test/mem.c uses vmalloc() and vfree() but does not
include linux/vmalloc.h. Kernel v6.10 made changes that causes the
currently included headers not depend on vmalloc.h and therefore
mem.c can no longer compile. Add linus/vmalloc.h to fix compile
issue.
CC [M] tools/testing/cxl/test/mem.o
tools/testing/cxl/test/mem.c: In function ‘label_area_release’:
tools/testing/cxl/test/mem.c:1428:9: error: implicit declaration of function ‘vfree’; did you mean ‘kvfree’? [-Werror=implicit-function-declaration]
1428 | vfree(lsa);
| ^~~~~
| kvfree
tools/testing/cxl/test/mem.c: In function ‘cxl_mock_mem_probe’:
tools/testing/cxl/test/mem.c:1466:22: error: implicit declaration of function ‘vmalloc’; did you mean ‘kmalloc’? [-Werror=implicit-function-declaration]
1466 | mdata->lsa = vmalloc(LSA_SIZE);
| ^~~~~~~
| kmalloc
Fixes: 7d3eb23c4ccf ("tools/testing/cxl: Introduce a mock memory device + driver")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
tools/testing/cxl/test/mem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
index 6584443144de..eaf091a3d331 100644
--- a/tools/testing/cxl/test/mem.c
+++ b/tools/testing/cxl/test/mem.c
@@ -3,6 +3,7 @@
#include <linux/platform_device.h>
#include <linux/mod_devicetable.h>
+#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/sizes.h>
--
2.45.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c
2024-05-28 22:55 [PATCH] cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c Dave Jiang
@ 2024-05-28 23:02 ` Dan Williams
2024-05-28 23:03 ` Alison Schofield
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2024-05-28 23:02 UTC (permalink / raw)
To: Dave Jiang, linux-cxl
Cc: dan.j.williams, ira.weiny, vishal.l.verma, alison.schofield,
Jonathan.Cameron, dave
Dave Jiang wrote:
> tools/testing/cxl/test/mem.c uses vmalloc() and vfree() but does not
> include linux/vmalloc.h. Kernel v6.10 made changes that causes the
> currently included headers not depend on vmalloc.h and therefore
> mem.c can no longer compile. Add linus/vmalloc.h to fix compile
> issue.
>
> CC [M] tools/testing/cxl/test/mem.o
> tools/testing/cxl/test/mem.c: In function ‘label_area_release’:
> tools/testing/cxl/test/mem.c:1428:9: error: implicit declaration of function ‘vfree’; did you mean ‘kvfree’? [-Werror=implicit-function-declaration]
> 1428 | vfree(lsa);
> | ^~~~~
> | kvfree
> tools/testing/cxl/test/mem.c: In function ‘cxl_mock_mem_probe’:
> tools/testing/cxl/test/mem.c:1466:22: error: implicit declaration of function ‘vmalloc’; did you mean ‘kmalloc’? [-Werror=implicit-function-declaration]
> 1466 | mdata->lsa = vmalloc(LSA_SIZE);
> | ^~~~~~~
> | kmalloc
>
> Fixes: 7d3eb23c4ccf ("tools/testing/cxl: Introduce a mock memory device + driver")
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> tools/testing/cxl/test/mem.c | 1 +
> 1 file changed, 1 insertion(+)
LGTM
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c
2024-05-28 22:55 [PATCH] cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c Dave Jiang
2024-05-28 23:02 ` Dan Williams
@ 2024-05-28 23:03 ` Alison Schofield
1 sibling, 0 replies; 3+ messages in thread
From: Alison Schofield @ 2024-05-28 23:03 UTC (permalink / raw)
To: Dave Jiang
Cc: linux-cxl, dan.j.williams, ira.weiny, vishal.l.verma,
Jonathan.Cameron, dave
On Tue, May 28, 2024 at 03:55:51PM -0700, Dave Jiang wrote:
> tools/testing/cxl/test/mem.c uses vmalloc() and vfree() but does not
> include linux/vmalloc.h. Kernel v6.10 made changes that causes the
> currently included headers not depend on vmalloc.h and therefore
> mem.c can no longer compile. Add linus/vmalloc.h to fix compile
> issue.
s/linus/linux
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
>
> CC [M] tools/testing/cxl/test/mem.o
> tools/testing/cxl/test/mem.c: In function ‘label_area_release’:
> tools/testing/cxl/test/mem.c:1428:9: error: implicit declaration of function ‘vfree’; did you mean ‘kvfree’? [-Werror=implicit-function-declaration]
> 1428 | vfree(lsa);
> | ^~~~~
> | kvfree
> tools/testing/cxl/test/mem.c: In function ‘cxl_mock_mem_probe’:
> tools/testing/cxl/test/mem.c:1466:22: error: implicit declaration of function ‘vmalloc’; did you mean ‘kmalloc’? [-Werror=implicit-function-declaration]
> 1466 | mdata->lsa = vmalloc(LSA_SIZE);
> | ^~~~~~~
> | kmalloc
>
> Fixes: 7d3eb23c4ccf ("tools/testing/cxl: Introduce a mock memory device + driver")
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> tools/testing/cxl/test/mem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
> index 6584443144de..eaf091a3d331 100644
> --- a/tools/testing/cxl/test/mem.c
> +++ b/tools/testing/cxl/test/mem.c
> @@ -3,6 +3,7 @@
>
> #include <linux/platform_device.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/vmalloc.h>
> #include <linux/module.h>
> #include <linux/delay.h>
> #include <linux/sizes.h>
> --
> 2.45.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-28 23:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 22:55 [PATCH] cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c Dave Jiang
2024-05-28 23:02 ` Dan Williams
2024-05-28 23:03 ` Alison Schofield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox