linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Is get_property() correct?
@ 2006-10-28  6:41 Grant Likely
  2006-10-28  6:53 ` Michael Ellerman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Grant Likely @ 2006-10-28  6:41 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev@ozlabs.org

Is the implementation of get_property correct?  The comment says it
returns the value of a property; but the return statement just returns
the property pointer (cast as void*) it got from of_find_property();
not the value.

Does the comment or the code need to change?

in prom.c:

/*
 * Find a property with a given name for a given node
 * and return the value.
 */
const void *get_property(const struct device_node *np, const char *name,
                         int *lenp)
{
        struct property *pp = of_find_property(np,name,lenp);
        return pp ? pp->value : NULL;
}
EXPORT_SYMBOL(get_property);

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-10-30  2:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-28  6:41 Is get_property() correct? Grant Likely
2006-10-28  6:53 ` Michael Ellerman
2006-10-28  7:17 ` Johannes Berg
2006-10-28  7:23   ` Grant Likely
2006-10-28  7:23 ` Benjamin Herrenschmidt
2006-10-28  7:38   ` Grant Likely
2006-10-28  9:08     ` Michael Ellerman
2006-10-30  2:05       ` unsubscribe Usha Rani Konudula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).