gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
Subsystems (2)
PATCH v2 1/1 gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
Add cleanup attribute for device node prg_node.
Remove of_node_put for device node prg_node as it is unnecessary now.
---
- PATCH v1:
https://lore.kernel.org/all/[email protected]/
- 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(-)
drivers/gpu/ipu-v3/ipu-prg.c +2 -5
@@ -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 ; }
Signature · 1 line
2.34.1
PATCH v2 1/1 gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup
Hello,
Can this be kindly reviewed? Thanks.
Quoted 2 lines · Abhinav Jain
Hello,
Can this be kindly reviewed? Thanks.
You removed all the relevant information for people to be able to review the patch :)
thanks,
-- Shuah
Quoted 9 lines · Shuah Khan
Quoted 2 lines · Abhinav Jain
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/[email protected]/
Quoted 48 lines
Add cleanup attribute for device node
prg_node.
Removeof_node_putfor device nodeprg_nodeas it is unnecessary now.Suggested-by Julia Lawall <[email protected]>Signed-off-by Abhinav Jain <[email protected]>---
- PATCH v1:
https://lore.kernel.org/all/[email protected]/- 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(-)drivers/gpu/ipu-v3/ipu-prg.c +2
-5@@ -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 ; }Signature · 1 line
2.34.1
Quoted 5 lines · Abhinav Jain
Add cleanup attribute for device node
prg_node.
Removeof_node_putfor device nodeprg_nodeas it is unnecessary now.Suggested-by Julia Lawall <[email protected]>Signed-off-by Abhinav Jain <[email protected]>
Thank you,
regards
Philipp