From f2065a85cc53eb86d8001fd0001e10388db9917f Mon Sep 17 00:00:00 2001 From: Yash Bhatt Date: Mon, 20 May 2024 07:11:11 +0000 Subject: [PATCH] video: tegra: nvmap: Remove use_numa parameter Remove use_numa parameter from nvmap_alloc.c because its redundant. Bug 4479027 Change-Id: I611b2e606299389d5ff0880b263abe6c161c2d0d Signed-off-by: Yash Bhatt Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158948 GVS: buildbot_gerritrpt Reviewed-by: Ashish Mhetre Reviewed-by: Sachin Nikam Tested-by: Bitan Biswas --- drivers/video/tegra/nvmap/nvmap_alloc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/video/tegra/nvmap/nvmap_alloc.c b/drivers/video/tegra/nvmap/nvmap_alloc.c index bd1a65d8..8e689b64 100644 --- a/drivers/video/tegra/nvmap/nvmap_alloc.c +++ b/drivers/video/tegra/nvmap/nvmap_alloc.c @@ -49,16 +49,13 @@ void nvmap_altfree(void *ptr, size_t len) kfree(ptr); } -static struct page *nvmap_alloc_pages_exact(gfp_t gfp, size_t size, bool use_numa, int numa_id) +static struct page *nvmap_alloc_pages_exact(gfp_t gfp, size_t size, int numa_id) { struct page *page, *p, *e; unsigned int order; order = get_order(size); - if (!use_numa) - page = alloc_pages(gfp, order); - else - page = alloc_pages_node(numa_id, gfp, order); + page = alloc_pages_node(numa_id, gfp, order); if (!page) return NULL; @@ -93,7 +90,7 @@ static int handle_page_alloc(struct nvmap_client *client, if (contiguous) { struct page *page; - page = nvmap_alloc_pages_exact(gfp, size, true, h->numa_id); + page = nvmap_alloc_pages_exact(gfp, size, h->numa_id); if (!page) goto fail; @@ -121,7 +118,7 @@ static int handle_page_alloc(struct nvmap_client *client, gfp_t gfp_no_reclaim = (gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM; page = nvmap_alloc_pages_exact(gfp_no_reclaim, - pages_per_big_pg << PAGE_SHIFT, true, h->numa_id); + pages_per_big_pg << PAGE_SHIFT, h->numa_id); if (!page) break; @@ -146,7 +143,7 @@ static int handle_page_alloc(struct nvmap_client *client, } for (i = allocated; i < nr_page; i++) { pages[i] = nvmap_alloc_pages_exact(gfp, PAGE_SIZE, - true, h->numa_id); + h->numa_id); if (!pages[i]) goto fail;