[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1206670117.13404.6.camel@caritas-dev.intel.com>
Date: Fri, 28 Mar 2008 10:08:37 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Paul Jackson <pj@....com>
Cc: hpa@...or.com, andi@...stfloor.org, mingo@...hat.com,
tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm 2/4] x86_64 boot: Add linked list of struct
setup_data
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists