[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <784b3f08-38f7-4479-9e83-03937fa2d19a@amd.com>
Date: Mon, 7 Apr 2025 19:49:16 +0200
From: Christian König <christian.koenig@....com>
To: Maxime Ripard <mripard@...nel.org>, Rob Herring <robh@...nel.org>,
Saravana Kannan <saravanak@...gle.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Benjamin Gaignard <benjamin.gaignard@...labora.com>,
Brian Starkey <Brian.Starkey@....com>, John Stultz <jstultz@...gle.com>,
"T.J. Mercier" <tjmercier@...gle.com>
Cc: Mattijs Korpershoek <mkorpershoek@...nel.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org
Subject: Re: [PATCH v3 1/2] dma-buf: heaps: system: Remove global variable
Am 07.04.25 um 18:29 schrieb Maxime Ripard:
> 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@...nel.org>
Reviewed-by: Christian König <christian.koenig@....com>
Going to push this one to drm-misc-next, but I can't judge if in any way possible if patch #2 is correct or not.
Regards,
Christian.
> ---
> drivers/dma-buf/heaps/system_heap.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
> index 26d5dc89ea1663a0d078e3a5723ca3d8d12b935f..82b1b714300d6ff5f3e543059dd8215ceaa00c69 100644
> --- a/drivers/dma-buf/heaps/system_heap.c
> +++ b/drivers/dma-buf/heaps/system_heap.c
> @@ -19,12 +19,10 @@
> #include <linux/module.h>
> #include <linux/scatterlist.h>
> #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;
> struct mutex lock;
> unsigned long len;
> @@ -422,10 +420,11 @@ 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;
> exp_info.priv = NULL;
>
>
Powered by blists - more mailing lists