From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] drivers/of: use __be32 types for big-endian device tree data
Date: Wed, 15 Sep 2010 12:57:05 -0600 [thread overview]
Message-ID: <20100915185705.GE4446@angua.secretlab.ca> (raw)
In-Reply-To: <1284434031.863044.443635323150.1.gpush@pororo>
On Tue, Sep 14, 2010 at 11:13:51AM +0800, Jeremy Kerr wrote:
> Use the sparse annotations so we can keep track of endianness.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Added to my test-devicetree branch
g.
>
> ---
> drivers/of/address.c | 2 +-
> drivers/of/base.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index fcadb72..3a1c7e7 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -163,7 +163,7 @@ static int of_bus_pci_translate(u32 *addr, u64 offset, int na)
> const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
> unsigned int *flags)
> {
> - const u32 *prop;
> + const __be32 *prop;
> unsigned int psize;
> struct device_node *parent;
> struct of_bus *bus;
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index aa80525..710b53b 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -33,7 +33,7 @@ DEFINE_RWLOCK(devtree_lock);
>
> int of_n_addr_cells(struct device_node *np)
> {
> - const int *ip;
> + const __be32 *ip;
>
> do {
> if (np->parent)
> @@ -49,7 +49,7 @@ EXPORT_SYMBOL(of_n_addr_cells);
>
> int of_n_size_cells(struct device_node *np)
> {
> - const int *ip;
> + const __be32 *ip;
>
> do {
> if (np->parent)
prev parent reply other threads:[~2010-09-15 18:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 3:13 [PATCH] drivers/of: use __be32 types for big-endian device tree data Jeremy Kerr
2010-09-14 3:20 ` Timur Tabi
[not found] ` <AANLkTi=ODinhAG6L62FGiA61nZkDEYweSThWW9J8BwXb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-14 3:23 ` David Gibson
2010-09-14 3:29 ` Jeremy Kerr
2010-09-15 18:57 ` Grant Likely [this message]
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=20100915185705.GE4446@angua.secretlab.ca \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.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