lkml.org 
[lkml]   [2016]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/PATCH] of: of_find_node_by_name - stop dropping reference to 'from' node
From
Date
On Thu, 2016-04-21 at 15:35 -0700, Frank Rowand wrote:
> No.  It is correct for of_find_by_name() to call of_node_put() for
> the from argument.  The callers should be fixed.

I would argue that if everybody makes the same mistake then our
interface is wrong. In that case I wrote it so I think I can plead
guilty to the mistake ;-)

In hindsight, but I don't have the stammina to do a tree-wide change, I
think we should have differenciated:

of_find_xxx which does *not* drop the reference

of_find_next_xxx which does

Cheers,
Ben.

\
 
 \ /
  Last update: 2016-04-22 01:01    [W:0.360 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site