* [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
@ 2024-07-04 13:21 Abhinav Jain
2024-08-12 19:37 ` Abhinav Jain
2024-09-04 8:48 ` Philipp Zabel
0 siblings, 2 replies; 5+ messages in thread
From: Abhinav Jain @ 2024-07-04 13:21 UTC (permalink / raw)
To: p.zabel, airlied, daniel, dri-devel, linux-kernel
Cc: skhan, javier.carrasco.cruz, jain.abhinav177, julia.lawall
Add cleanup attribute for device node prg_node.
Remove of_node_put for device node prg_node as it is unnecessary now.
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
- PATCH v1:
https://lore.kernel.org/all/20240702150109.1002065-1-jain.abhinav177@gmail.com/
- Changes since v1:
Enhanced the commit description to better suit the work being done
as per the feedback in v1
---
drivers/gpu/ipu-v3/ipu-prg.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c
index 729605709955..d1f46bc761ec 100644
--- a/drivers/gpu/ipu-v3/ipu-prg.c
+++ b/drivers/gpu/ipu-v3/ipu-prg.c
@@ -84,8 +84,8 @@ static LIST_HEAD(ipu_prg_list);
struct ipu_prg *
ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
{
- struct device_node *prg_node = of_parse_phandle(dev->of_node,
- name, 0);
+ struct device_node *prg_node __free(device_node) =
+ of_parse_phandle(dev->of_node, name, 0);
struct ipu_prg *prg;
mutex_lock(&ipu_prg_list_mutex);
@@ -95,14 +95,11 @@ ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
device_link_add(dev, prg->dev,
DL_FLAG_AUTOREMOVE_CONSUMER);
prg->id = ipu_id;
- of_node_put(prg_node);
return prg;
}
}
mutex_unlock(&ipu_prg_list_mutex);
- of_node_put(prg_node);
-
return NULL;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
2024-07-04 13:21 [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup Abhinav Jain
@ 2024-08-12 19:37 ` Abhinav Jain
2024-08-13 8:30 ` Shuah Khan
2024-09-04 8:48 ` Philipp Zabel
1 sibling, 1 reply; 5+ messages in thread
From: Abhinav Jain @ 2024-08-12 19:37 UTC (permalink / raw)
To: jain.abhinav177
Cc: airlied, daniel, dri-devel, javier.carrasco.cruz, julia.lawall,
linux-kernel, p.zabel, skhan
Hello,
Can this be kindly reviewed? Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
2024-08-12 19:37 ` Abhinav Jain
@ 2024-08-13 8:30 ` Shuah Khan
2024-08-13 8:50 ` Abhinav Jain
0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2024-08-13 8:30 UTC (permalink / raw)
To: Abhinav Jain
Cc: airlied, daniel, dri-devel, javier.carrasco.cruz, julia.lawall,
linux-kernel, p.zabel, Shuah Khan
On 8/12/24 13:37, Abhinav Jain wrote:
> Hello,
> Can this be kindly reviewed? Thanks.
You removed all the relevant information for people to be able to review the
patch :)
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
2024-08-13 8:30 ` Shuah Khan
@ 2024-08-13 8:50 ` Abhinav Jain
0 siblings, 0 replies; 5+ messages in thread
From: Abhinav Jain @ 2024-08-13 8:50 UTC (permalink / raw)
To: skhan
Cc: airlied, daniel, dri-devel, jain.abhinav177, javier.carrasco.cruz,
julia.lawall, linux-kernel, p.zabel
On Tue, 13 Aug 2024 02:30:54 -0600, Shuah Khan wrote:
> On 8/12/24 13:37, Abhinav Jain wrote:
> > Hello,
> > Can this be kindly reviewed? Thanks.
>
> You removed all the relevant information for people to be able to review the
> patch :)
>
> thanks,
> -- Shuah
Sorry, here is the patch link and I am attaching inlined as well:
https://lore.kernel.org/all/20240704132142.1003887-1-jain.abhinav177@gmail.com/
> Add cleanup attribute for device node prg_node.
> Remove of_node_put for device node prg_node as it is unnecessary now.
>
> Suggested-by: Julia Lawall <julia.lawall@inria.fr>
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
> ---
> - PATCH v1:
> https://lore.kernel.org/all/20240702150109.1002065-1-jain.abhinav177@gmail.com/
>
> - Changes since v1:
> Enhanced the commit description to better suit the work being done
> as per the feedback in v1
> ---
> drivers/gpu/ipu-v3/ipu-prg.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c
> index 729605709955..d1f46bc761ec 100644
> --- a/drivers/gpu/ipu-v3/ipu-prg.c
> +++ b/drivers/gpu/ipu-v3/ipu-prg.c
> @@ -84,8 +84,8 @@ static LIST_HEAD(ipu_prg_list);
> struct ipu_prg *
> ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
> {
> - struct device_node *prg_node = of_parse_phandle(dev->of_node,
> - name, 0);
> + struct device_node *prg_node __free(device_node) =
> + of_parse_phandle(dev->of_node, name, 0);
> struct ipu_prg *prg;
>
> mutex_lock(&ipu_prg_list_mutex);
> @@ -95,14 +95,11 @@ ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
> device_link_add(dev, prg->dev,
> DL_FLAG_AUTOREMOVE_CONSUMER);
> prg->id = ipu_id;
> - of_node_put(prg_node);
> return prg;
> }
> }
> mutex_unlock(&ipu_prg_list_mutex);
>
> - of_node_put(prg_node);
> -
> return NULL;
> }
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
2024-07-04 13:21 [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup Abhinav Jain
2024-08-12 19:37 ` Abhinav Jain
@ 2024-09-04 8:48 ` Philipp Zabel
1 sibling, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2024-09-04 8:48 UTC (permalink / raw)
To: Abhinav Jain, airlied, daniel, dri-devel, linux-kernel
Cc: skhan, javier.carrasco.cruz, julia.lawall
On Do, 2024-07-04 at 13:21 +0000, Abhinav Jain wrote:
> Add cleanup attribute for device node prg_node.
> Remove of_node_put for device node prg_node as it is unnecessary now.
>
> Suggested-by: Julia Lawall <julia.lawall@inria.fr>
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
Thank you,
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-04 8:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04 13:21 [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup Abhinav Jain
2024-08-12 19:37 ` Abhinav Jain
2024-08-13 8:30 ` Shuah Khan
2024-08-13 8:50 ` Abhinav Jain
2024-09-04 8:48 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox