[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dy5tnbzlla5dbr2z6u2q7fwfnnwcn3m4l52pkc2ycrfdqy7qw3@jkvgq3f3khtk>
Date: Tue, 18 Nov 2025 14:57:22 +0100
From: Andi Shyti <andi.shyti@...nel.org>
To: Zilin Guan <zilin@....edu.cn>
Cc: jani.nikula@...ux.intel.com, joonas.lahtinen@...ux.intel.com,
rodrigo.vivi@...el.com, tursulin@...ulin.net, airlied@...il.com, simona@...ll.ch,
andi.shyti@...ux.intel.com, mikolaj.wasiak@...el.com, krzysztof.karas@...el.com,
krzysztof.niemiec@...el.com, nitin.r.gote@...el.com, intel-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, jianhao.xu@....edu.cn
Subject: Re: [PATCH v2] drm/i915: Use symmetric free for vma resources
Hi Zilin,
On Thu, Nov 13, 2025 at 06:34:05AM +0000, Zilin Guan wrote:
> The error paths in reserve_gtt_with_resource() and
> insert_gtt_with_resource() use kfree() to release a vma_res object
> that was allocated with i915_vma_resource_alloc().
>
> While kfree() can handle slab-allocated objects, it is better practice
> to use the symmetric free function.
>
> Replace kfree() with the specific i915_vma_resource_free() helper to
> improve readability and ensure the alloc/free pairing is explicit.
>
> Signed-off-by: Zilin Guan <zilin@....edu.cn>
Thanks for your patch,
Reviewed-by: Andi Shyti <andi.shyti@...ux.intel.com>
Andi
Powered by blists - more mailing lists