From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Cédric Le Goater" <clg@fr.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] offb: make the screen properties endian safe
Date: Thu, 31 Oct 2013 13:08:27 +1100 [thread overview]
Message-ID: <1383185307.5117.74.camel@pasglop> (raw)
In-Reply-To: <1383149647-15500-1-git-send-email-clg@fr.ibm.com>
On Wed, 2013-10-30 at 17:14 +0100, Cédric Le Goater wrote:
> @@ -552,25 +552,25 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
> if (pp == NULL)
> pp = of_get_property(dp, "depth", &len);
> if (pp && len == sizeof(u32))
> - depth = *pp;
> + depth = be32_to_cpu(*pp);
This is usually written as
depth = be32_to_cpup(pp);
It used to be that the latter generated better code but that might not
be the case anymore, however it's still a better alternative.
Cheers,
Ben.
next prev parent reply other threads:[~2013-10-31 2:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 16:14 [PATCH] offb: make the screen properties endian safe Cédric Le Goater
2013-10-31 2:08 ` Benjamin Herrenschmidt [this message]
2013-10-31 9:36 ` [PATCH v2] " Cédric Le Goater
2013-11-20 22:50 ` Benjamin Herrenschmidt
2013-11-21 15:45 ` Cedric Le Goater
2013-11-21 19:57 ` Benjamin Herrenschmidt
2013-11-23 17:38 ` Cedric Le Goater
2013-11-23 21:04 ` Benjamin Herrenschmidt
2013-12-04 16:47 ` Cedric Le Goater
2013-12-04 16:49 ` [PATCH v3 1/2] offb: little endian fixes Cédric Le Goater
2013-12-04 16:49 ` [PATCH v3 2/2] offb: add palette hack for little endian Cédric Le Goater
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=1383185307.5117.74.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=clg@fr.ibm.com \
--cc=linuxppc-dev@lists.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).