summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-09-14 18:28:07 +0200
committerIngo Molnar <mingo@elte.hu>2009-09-20 20:12:21 +0200
commit9ff6d8e06fbd9249804d43574167c2acc52886be (patch)
tree644d7c982c9c0738904cd1bf6aba8e1fa4547099 /arch
parentRevert 'x86: Fix system crash when loading with "reservetop" parameter' (diff)
downloadlinux-9ff6d8e06fbd9249804d43574167c2acc52886be.tar.xz
linux-9ff6d8e06fbd9249804d43574167c2acc52886be.zip
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')
-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)
return -EINVAL;
base = simple_strtoull(line + 5, &ptr, 0);
- for (; isspace(*ptr); ++ptr)
- ;
+ while (isspace(*ptr))
+ ptr++;
if (strncmp(ptr, "size=", 5))
return -EINVAL;
@@ -135,14 +135,14 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
size = simple_strtoull(ptr + 5, &ptr, 0);
if ((base & 0xfff) || (size & 0xfff))
return -EINVAL;
- for (; isspace(*ptr); ++ptr)
- ;
+ while (isspace(*ptr))
+ ptr++;
if (strncmp(ptr, "type=", 5))
return -EINVAL;
ptr += 5;
- for (; isspace(*ptr); ++ptr)
- ;
+ while (isspace(*ptr))
+ ptr++;
for (i = 0; i < MTRR_NUM_TYPES; ++i) {
if (strcmp(ptr, mtrr_strings[i]))