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

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Maxime Ripard and committed by
Christian König
92a2bf25 b9a96a0b

+1 -2
+1 -2
drivers/dma-buf/heaps/system_heap.c
··· 21 21 #include <linux/slab.h> 22 22 #include <linux/vmalloc.h> 23 23 24 - static struct dma_heap *sys_heap; 25 - 26 24 struct system_heap_buffer { 27 25 struct dma_heap *heap; 28 26 struct list_head attachments; ··· 422 424 static int __init system_heap_create(void) 423 425 { 424 426 struct dma_heap_export_info exp_info; 427 + struct dma_heap *sys_heap; 425 428 426 429 exp_info.name = "system"; 427 430 exp_info.ops = &system_heap_ops;