From 4dd9cd92d4c19b1f1d4b91579ddff6b29bb799c4 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 5 Nov 2024 13:55:15 +0000 Subject: [PATCH] video: tegra: nvmap: Add missing vmalloc.h After removing nvmap_priv.h, nvmap no longer builds for Linux v6.10+ kernels and error such as the following are observed ... drivers/video/tegra/nvmap/nvmap_alloc.c:41:24: error: implicit declaration of function 'vzalloc'; did you mean 'kzalloc'? [-Werror=implicit-function-declaration] 41 | return vzalloc(len); | ^~~~~~~ | kzalloc drivers/video/tegra/nvmap/nvmap_alloc.c:52:17: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration] 52 | vfree(ptr); | ^~~~~ | kvfree Fix this by including vmalloc.h in the necessary files. JIRA TMM-5751 Change-Id: I49fae7ea5a78f0029706c2bd12b5553e5903f31b Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243752 GVS: buildbot_gerritrpt Reviewed-by: Ketan Patil --- drivers/video/tegra/nvmap/nvmap_alloc.c | 3 ++- drivers/video/tegra/nvmap/nvmap_handle.c | 1 + drivers/video/tegra/nvmap/nvmap_heap.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/video/tegra/nvmap/nvmap_alloc.c b/drivers/video/tegra/nvmap/nvmap_alloc.c index 7f3a64a4..6b219d08 100644 --- a/drivers/video/tegra/nvmap/nvmap_alloc.c +++ b/drivers/video/tegra/nvmap/nvmap_alloc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "nvmap_stats.h" #include "nvmap_dev.h" #include "nvmap_alloc.h" @@ -581,4 +582,4 @@ void nvmap_alloc_free(struct page **pages, unsigned int nr_page, bool from_va, phys_addr_t nvmap_alloc_get_co_base(struct nvmap_handle *h) { return h->carveout->base; -} \ No newline at end of file +} diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c index b5f191d0..74b0fbd3 100644 --- a/drivers/video/tegra/nvmap/nvmap_handle.c +++ b/drivers/video/tegra/nvmap/nvmap_handle.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/tegra/nvmap/nvmap_heap.c b/drivers/video/tegra/nvmap/nvmap_heap.c index 77a127bc..f7d8c078 100644 --- a/drivers/video/tegra/nvmap/nvmap_heap.c +++ b/drivers/video/tegra/nvmap/nvmap_heap.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "nvmap_dev.h" #include "nvmap_alloc.h" #include "nvmap_handle.h"