From: "Huang, Ying" <ying.huang@intel.com>
To: Paul Jackson <pj@sgi.com>
Cc: hpa@zytor.com, andi@firstfloor.org, mingo@redhat.com,
tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 2/4] x86_64 boot: Add linked list of struct setup_data
Date: Fri, 28 Mar 2008 10:08:37 +0800 [thread overview]
Message-ID: <1206670117.13404.6.camel@caritas-dev.intel.com> (raw)
In-Reply-To: <20080327062539.5cbcb925.pj@sgi.com>
On Thu, 2008-03-27 at 06:25 -0500, Paul Jackson wrote:
> Huang wrote:
> + while (pa_data) {
> + data = early_ioremap(pa_data, PAGE_SIZE);
> + switch (data->type) {
> + default:
> + break;
> + }
>
> Isn't that switch statement equivalent to -always- breaking, as in:
>
> + while (pa_data) {
> + data = early_ioremap(pa_data, PAGE_SIZE);
> + break;
>
> I doubt you want to do that. I suppose what you want to do is check for
> data == NULL instead, as in:
>
> + while (pa_data) {
> + data = early_ioremap(pa_data, PAGE_SIZE);
> + if (!data)
> + break;
This break will break the switch instead of while. When setup_data
processing code is added, the code will looks like:
#define SETUP_DATA_E820_EXT 1
while (pa_data) {
data = early_ioremap(pa_data, PAGE_SIZE);
switch (data->type) {
case SETUP_DATA_E820_EXT:
parse_e820_ext(data, pa_data);
break;
default:
break;
}
...
Best Regards,
Huang Ying
next prev parent reply other threads:[~2008-03-28 2:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 7:09 [PATCH -mm 2/4] x86_64 boot: Add linked list of struct setup_data Huang, Ying
2008-03-27 11:25 ` Paul Jackson
2008-03-28 2:08 ` Huang, Ying [this message]
2008-03-29 6:20 ` Paul Jackson
2008-03-27 11:33 ` Paul Jackson
2008-03-28 2:09 ` Huang, Ying
2008-03-29 6:24 ` Paul Jackson
2008-03-29 17:06 ` H. Peter Anvin
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=1206670117.13404.6.camel@caritas-dev.intel.com \
--to=ying.huang@intel.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pj@sgi.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox