From: Andrew Morton <akpm@linux-foundation.org>
To: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Samuel Ortiz <samuel@sortiz.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [POWERPC] 8xx: PQ SoC IRDA support
Date: Wed, 9 May 2007 16:53:17 -0700 [thread overview]
Message-ID: <20070509165317.fcf7dbf5.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070508224206.4039.87074.stgit@localhost.localdomain>
On Wed, 09 May 2007 02:42:07 +0400
Vitaly Bordug <vitb@kernel.crashing.org> wrote:
> + model = (char *)get_property(np, "model", NULL);
> + if (model == NULL)
> + return -ENODEV;
> +
> + id = (u32 *) get_property(np, "device-id", NULL);
get_property() got renamed to of_get_property().
You have two coding-styles in the typecasting here. The former (no space)
is more common and makes more sense, IMO.
However of_get_property() returns const void* so really you shouldn't be
doing any casting at all. `model' should have type `const char *' and then
you can do
model = get_property(np, "model", NULL);
which has nice type-safety and const-correctness.
next prev parent reply other threads:[~2007-05-09 23:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 22:42 [PATCH] [POWERPC] 8xx: PQ SoC IRDA support Vitaly Bordug
2007-05-09 8:42 ` Samuel Ortiz
2007-05-09 10:53 ` Vitaly Bordug
2007-05-09 13:46 ` Samuel Ortiz
2007-05-09 22:36 ` Vitaly Bordug
2007-05-09 23:53 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-08 5:27 Vitaly Bordug
2007-05-08 14:36 ` Loeliger Jon-LOELIGER
2007-05-08 16:18 ` Vitaly Bordug
2007-05-08 1:30 Vitaly Bordug
2007-05-08 13:33 ` Kumar Gala
2007-05-08 16:19 ` Vitaly Bordug
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=20070509165317.fcf7dbf5.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=samuel@sortiz.org \
--cc=vitb@kernel.crashing.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).