[PATCH 2/2] OMAPDSS: of-dss: omap_dss_find_output_by_port_node() keep port refcount

Subsystems: framebuffer layer, omap display subsystem and framebuffer support (dss2), the rest

STALE4033d

2 messages, 2 authors, 2015-08-07 · open the first message on its own page

[PATCH 2/2] OMAPDSS: of-dss: omap_dss_find_output_by_port_node() keep port refcount

From: Jyri Sarha <hidden>
Date: 2015-08-06 18:41:25

The only user of dss_of_port_get_parent_device() function is
omap_dss_find_output_by_port_node() and it assumes the refcount of the
port parameter is not decremented by the call.

Signed-off-by: Jyri Sarha <redacted>
---
 drivers/video/fbdev/omap2/dss/dss-of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/omap2/dss/dss-of.c b/drivers/video/fbdev/omap2/dss/dss-of.c
index ab6ef16..43f999d 100644
--- a/drivers/video/fbdev/omap2/dss/dss-of.c
+++ b/drivers/video/fbdev/omap2/dss/dss-of.c
@@ -95,7 +95,7 @@ struct device_node *dss_of_port_get_parent_device(struct device_node *port)
 	if (!port)
 		return NULL;
 
-	np = of_get_next_parent(port);
+	np = of_get_parent(port);
 
 	for (i = 0; i < 2 && np; ++i) {
 		struct property *prop;
-- 
1.9.1

Re: [PATCH 2/2] OMAPDSS: of-dss: omap_dss_find_output_by_port_node() keep port refcount

From: Tomi Valkeinen <hidden>
Date: 2015-08-07 10:49:12

Hi,

On 06/08/15 21:41, Jyri Sarha wrote:
The only user of dss_of_port_get_parent_device() function is
omap_dss_find_output_by_port_node() and it assumes the refcount of the
port parameter is not decremented by the call.
The subject of the patch should contain "dss-of", not "of-dss". Although
for both patches I think it's fine to use plain "OMAPDSS: " prefix. The
subject should also say "fix" or such.

The description above is kind of "detached". A patch description should
generally describe something in the lines of what the current behavior
is, what the problem is, and what the patch does. And the desc should be
independent of the subject.

This particular case is rather simple, and it's clear that
dss_of_port_get_parent_device() is not supposed to decrease the refcount
of the "port" parameter (as that kind of behavior is normally a special
case). And so it should be enough to say what the issue seen is and that
you fix the function to not decrement the parameter's refcount.

 Tomi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help