All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] olpc: fix endian bug in openfirmware workaround
Date: Wed, 24 Sep 2008 09:53:38 +0200	[thread overview]
Message-ID: <20080924075338.GE3655@elte.hu> (raw)
In-Reply-To: <1222208409.16003.25.camel@brick>


* Harvey Harrison <harvey.harrison@gmail.com> wrote:

> Boardrev is always treated as a u32 everywhere else, no reason to 
> byteswap the 0xc2 value.  The only use is to print out if it is a 
> prerelease board, the test being:
> 
> (olpc_platform_info.boardrev & 0xf) < 8
> 
> Which is currently always true as be32_to_cpu(0xc2) & 0xf = 0
> but I doubt that was the intention here.  The consequences of the bug
> are pretty minor though (incorrect boardrev displayed in dmesg when
> ofw support not configured)
> 
> Also annotate the temporary used to read the boardrev in the ofw
> case.
> 
> The confusion was noticed by sparse:
> arch/x86/kernel/olpc.c:206:32: warning: cast to restricted __be32
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>

applied to tip/x86/sparse-fixes, thanks Harvey!

	Ingo

  reply	other threads:[~2008-09-24  7:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 22:20 [PATCH] olpc: fix endian bug in openfirmware workaround Harvey Harrison
2008-09-24  7:53 ` Ingo Molnar [this message]
2009-02-14  1:56 ` [PATCH] olpc: fix model detection without OFW Chris Ball
2009-02-14  4:19   ` Andres Salomon
2009-02-14 21:43     ` Ingo Molnar
2009-02-14 21:53       ` Andres Salomon
2009-02-14 22:14         ` Ingo Molnar
2009-02-14 22:32           ` Andres Salomon

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=20080924075338.GE3655@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.