aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-09-14 12:28:07 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-20 14:12:21 -0400
commit9ff6d8e06fbd9249804d43574167c2acc52886be (patch)
tree644d7c982c9c0738904cd1bf6aba8e1fa4547099 /arch/x86
parenteda6da9286ad5b35b1eb70f6368958a8ee41a9dd (diff)
x86, mtrr: Convert loop to a while based construct, avoid naked semicolon
Perhaps this is a more readable/standard form. Signed-off-by: Joe Perches <joe@perches.com> LKML-Reference: <1252945687.3937.14.camel@Joe-Laptop.home> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/mtrr/if.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index 08b6ea4c62b4..f04e72527604 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -126,8 +126,8 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
126 return -EINVAL; 126 return -EINVAL;
127 127
128 base = simple_strtoull(line + 5, &ptr, 0); 128 base = simple_strtoull(line + 5, &ptr, 0);
129 for (; isspace(*ptr); ++ptr) 129 while (isspace(*ptr))
130 ; 130 ptr++;
131 131
132 if (strncmp(ptr, "size=", 5)) 132 if (strncmp(ptr, "size=", 5))
133 return -EINVAL; 133 return -EINVAL;
@@ -135,14 +135,14 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
135 size = simple_strtoull(ptr + 5, &ptr, 0); 135 size = simple_strtoull(ptr + 5, &ptr, 0);
136 if ((base & 0xfff) || (size & 0xfff)) 136 if ((base & 0xfff) || (size & 0xfff))
137 return -EINVAL; 137 return -EINVAL;
138 for (; isspace(*ptr); ++ptr) 138 while (isspace(*ptr))
139 ; 139 ptr++;
140 140
141 if (strncmp(ptr, "type=", 5)) 141 if (strncmp(ptr, "type=", 5))
142 return -EINVAL; 142 return -EINVAL;
143 ptr += 5; 143 ptr += 5;
144 for (; isspace(*ptr); ++ptr) 144 while (isspace(*ptr))
145 ; 145 ptr++;
146 146
147 for (i = 0; i < MTRR_NUM_TYPES; ++i) { 147 for (i = 0; i < MTRR_NUM_TYPES; ++i) {
148 if (strcmp(ptr, mtrr_strings[i])) 148 if (strcmp(ptr, mtrr_strings[i]))