Skip to content

Commit 92a2bf2

Browse files
mripardChristianKoenigAMD
authored andcommitted
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>
1 parent b9a96a0 commit 92a2bf2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/dma-buf/heaps/system_heap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include <linux/slab.h>
2222
#include <linux/vmalloc.h>
2323

24-
static struct dma_heap *sys_heap;
25-
2624
struct system_heap_buffer {
2725
struct dma_heap *heap;
2826
struct list_head attachments;
@@ -424,6 +422,7 @@ static const struct dma_heap_ops system_heap_ops = {
424422
static int __init system_heap_create(void)
425423
{
426424
struct dma_heap_export_info exp_info;
425+
struct dma_heap *sys_heap;
427426

428427
exp_info.name = "system";
429428
exp_info.ops = &system_heap_ops;

0 commit comments

Comments
 (0)