From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Is get_property() correct?
Date: Sat, 28 Oct 2006 00:41:59 -0600 [thread overview]
Message-ID: <528646bc0610272341s3c655ebbn785b373f148f6174@mail.gmail.com> (raw)
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
next reply other threads:[~2006-10-28 6:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-28 6:41 Grant Likely [this message]
2006-10-28 6:53 ` Is get_property() correct? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528646bc0610272341s3c655ebbn785b373f148f6174@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).