Re: [PATCH][next] drivers: video: Simplify device_node cleanup using __free

2024-04-20 Thread Shresth Prasad
20 Apr 2024 1:13:42 am Dmitry Baryshkov : > On Sat, Apr 20, 2024 at 12:22:41AM +0530, Shresth Prasad wrote: >> >>> Please fix the subject line to be "backlight: : ...". I came >>> very close to deleting this patch without reading it ;-) . >> >> Really sorry about that, I'll fix it. >> >>> Do

Re: [PATCH][next] drivers: video: Simplify device_node cleanup using __free

2024-04-19 Thread Dmitry Baryshkov
On Sat, Apr 20, 2024 at 12:22:41AM +0530, Shresth Prasad wrote: > > > Please fix the subject line to be "backlight: : ...". I came > > very close to deleting this patch without reading it ;-) . > > Really sorry about that, I'll fix it. > > > Do we need to get dev->of_node at all? The device,

Re: [PATCH][next] drivers: video: Simplify device_node cleanup using __free

2024-04-19 Thread Shresth Prasad
> Please fix the subject line to be "backlight: : ...". I came > very close to deleting this patch without reading it ;-) . Really sorry about that, I'll fix it. > Do we need to get dev->of_node at all? The device, which we are > borrowing, already owns a reference to the node so I don't see >

Re: [PATCH][next] drivers: video: Simplify device_node cleanup using __free

2024-04-19 Thread Daniel Thompson
^^^ Please fix the subject line to be "backlight: : ...". I came very close to deleting this patch without reading it ;-) . On Fri, Apr 19, 2024 at 01:13:02AM +0530, Shresth Prasad wrote: > diff --git a/drivers/video/backlight/sky81452-backlight.c >

[PATCH][next] drivers: video: Simplify device_node cleanup using __free

2024-04-18 Thread Shresth Prasad
Add `__free` function attribute to `np` device_node pointer initialisation and remove of_node_put cleanup for this pointer. The `__free` attribute is used for scope based cleanup instead of manually freeing the resource using `of_node_put`, making cleanup simpler and safer. Suggested-by: Julia