summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2025-04-07 19:29:07 +0300
committerChristian König <christian.koenig@amd.com>2025-04-08 12:48:39 +0300
commit92a2bf257ec4729d13ed17f5b04192ad8e3b7024 (patch)
treeddf397b50590c3cbd0e329660ed718465cf2a07a
parentb9a96a0be905037245d58668c41c3c4b015578b6 (diff)
downloadlinux-92a2bf257ec4729d13ed17f5b04192ad8e3b7024.tar.xz
dma-buf: heaps: system: Remove global variable
The system heap is storing its struct dma_heap pointer in a global variable but isn't using it anywhere. Let's move the global variable into system_heap_create() to make it local. Signed-off-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250407-dma-buf-ecc-heap-v3-1-97cdd36a5f29@kernel.org Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r--drivers/dma-buf/heaps/system_heap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
index 26d5dc89ea16..82b1b714300d 100644
--- a/drivers/dma-buf/heaps/system_heap.c
+++ b/drivers/dma-buf/heaps/system_heap.c
@@ -21,8 +21,6 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
-static struct dma_heap *sys_heap;
-
struct system_heap_buffer {
struct dma_heap *heap;
struct list_head attachments;
@@ -424,6 +422,7 @@ static const struct dma_heap_ops system_heap_ops = {
static int __init system_heap_create(void)
{
struct dma_heap_export_info exp_info;
+ struct dma_heap *sys_heap;
exp_info.name = "system";
exp_info.ops = &system_heap_ops;