login
Header Space

 
 

Re: [PATCH -mm 2/4] x86_64 boot: Add linked list of struct setup_data

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Huang, Ying <ying.huang@...>
Cc: <hpa@...>, <andi@...>, <mingo@...>, <tglx@...>, <linux-kernel@...>
Date: Thursday, March 27, 2008 - 7:25 am

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;

???

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH -mm 2/4] x86_64 boot: Add linked list of struct s..., Paul Jackson, (Thu Mar 27, 7:25 am)
speck-geostationary