linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: Is get_property() correct?
Date: Sat, 28 Oct 2006 16:53:20 +1000	[thread overview]
Message-ID: <1162018400.14822.4.camel@localhost.localdomain> (raw)
In-Reply-To: <528646bc0610272341s3c655ebbn785b373f148f6174@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Sat, 2006-10-28 at 00:41 -0600, Grant Likely wrote:
> 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.

Minor correction, it returns the property->value pointer as a void *.

> Does the comment or the code need to change?

I don't think so. get_property() can't return the actual value because
it doesn't know what type it is, so it returns a void pointer to the
value and it's up to the caller to interpret it based on the callers
knowledge of what it's expecting, and/or the lenp.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  reply	other threads:[~2006-10-28  6:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-28  6:41 Is get_property() correct? Grant Likely
2006-10-28  6:53 ` Michael Ellerman [this message]
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=1162018400.14822.4.camel@localhost.localdomain \
    --to=michael@ellerman.id.au \
    --cc=grant.likely@secretlab.ca \
    --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).