aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Walter <dwalter@google.com>2014-08-08 17:24:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:28 -0400
commit164109e3cdba52b9f2ece063bc3aa2a90f77c273 (patch)
treef91a9f3583ae334cc03fabbef98c396e6089bb05
parent1618bd53e6f43918f90ca04a4fcaf664b0a78749 (diff)
arch/x86: replace strict_strto calls
Replace obsolete strict_strto calls with appropriate kstrto calls Signed-off-by: Daniel Walter <dwalter@google.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c4
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c6
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd.c4
-rw-r--r--arch/x86/kvm/mmu_audit.c2
-rw-r--r--arch/x86/platform/uv/tlb_uv.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 9c8f7394c612..c7035073dfc1 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -461,7 +461,7 @@ static ssize_t store_cache_disable(struct _cpuid4_info *this_leaf,
461 461
462 cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map)); 462 cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map));
463 463
464 if (strict_strtoul(buf, 10, &val) < 0) 464 if (kstrtoul(buf, 10, &val) < 0)
465 return -EINVAL; 465 return -EINVAL;
466 466
467 err = amd_set_l3_disable_slot(this_leaf->base.nb, cpu, slot, val); 467 err = amd_set_l3_disable_slot(this_leaf->base.nb, cpu, slot, val);
@@ -511,7 +511,7 @@ store_subcaches(struct _cpuid4_info *this_leaf, const char *buf, size_t count,
511 if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING)) 511 if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
512 return -EINVAL; 512 return -EINVAL;
513 513
514 if (strict_strtoul(buf, 16, &val) < 0) 514 if (kstrtoul(buf, 16, &val) < 0)
515 return -EINVAL; 515 return -EINVAL;
516 516
517 if (amd_set_subcaches(cpu, val)) 517 if (amd_set_subcaches(cpu, val))
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 4fc57975acc1..bd9ccda8087f 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2136,7 +2136,7 @@ static ssize_t set_bank(struct device *s, struct device_attribute *attr,
2136{ 2136{
2137 u64 new; 2137 u64 new;
2138 2138
2139 if (strict_strtoull(buf, 0, &new) < 0) 2139 if (kstrtou64(buf, 0, &new) < 0)
2140 return -EINVAL; 2140 return -EINVAL;
2141 2141
2142 attr_to_bank(attr)->ctl = new; 2142 attr_to_bank(attr)->ctl = new;
@@ -2174,7 +2174,7 @@ static ssize_t set_ignore_ce(struct device *s,
2174{ 2174{
2175 u64 new; 2175 u64 new;
2176 2176
2177 if (strict_strtoull(buf, 0, &new) < 0) 2177 if (kstrtou64(buf, 0, &new) < 0)
2178 return -EINVAL; 2178 return -EINVAL;
2179 2179
2180 if (mca_cfg.ignore_ce ^ !!new) { 2180 if (mca_cfg.ignore_ce ^ !!new) {
@@ -2198,7 +2198,7 @@ static ssize_t set_cmci_disabled(struct device *s,
2198{ 2198{
2199 u64 new; 2199 u64 new;
2200 2200
2201 if (strict_strtoull(buf, 0, &new) < 0) 2201 if (kstrtou64(buf, 0, &new) < 0)
2202 return -EINVAL; 2202 return -EINVAL;
2203 2203
2204 if (mca_cfg.cmci_disabled ^ !!new) { 2204 if (mca_cfg.cmci_disabled ^ !!new) {
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 603df4f74640..1e49f8f41276 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -353,7 +353,7 @@ store_interrupt_enable(struct threshold_block *b, const char *buf, size_t size)
353 if (!b->interrupt_capable) 353 if (!b->interrupt_capable)
354 return -EINVAL; 354 return -EINVAL;
355 355
356 if (strict_strtoul(buf, 0, &new) < 0) 356 if (kstrtoul(buf, 0, &new) < 0)
357 return -EINVAL; 357 return -EINVAL;
358 358
359 b->interrupt_enable = !!new; 359 b->interrupt_enable = !!new;
@@ -372,7 +372,7 @@ store_threshold_limit(struct threshold_block *b, const char *buf, size_t size)
372 struct thresh_restart tr; 372 struct thresh_restart tr;
373 unsigned long new; 373 unsigned long new;
374 374
375 if (strict_strtoul(buf, 0, &new) < 0) 375 if (kstrtoul(buf, 0, &new) < 0)
376 return -EINVAL; 376 return -EINVAL;
377 377
378 if (new > THRESHOLD_MAX) 378 if (new > THRESHOLD_MAX)
diff --git a/arch/x86/kvm/mmu_audit.c b/arch/x86/kvm/mmu_audit.c
index 1185fe7a7f47..9ade5cfb5a4c 100644
--- a/arch/x86/kvm/mmu_audit.c
+++ b/arch/x86/kvm/mmu_audit.c
@@ -273,7 +273,7 @@ static int mmu_audit_set(const char *val, const struct kernel_param *kp)
273 int ret; 273 int ret;
274 unsigned long enable; 274 unsigned long enable;
275 275
276 ret = strict_strtoul(val, 10, &enable); 276 ret = kstrtoul(val, 10, &enable);
277 if (ret < 0) 277 if (ret < 0)
278 return -EINVAL; 278 return -EINVAL;
279 279
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index ed161c6e278b..3968d67d366b 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1479,7 +1479,7 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user,
1479 return count; 1479 return count;
1480 } 1480 }
1481 1481
1482 if (strict_strtol(optstr, 10, &input_arg) < 0) { 1482 if (kstrtol(optstr, 10, &input_arg) < 0) {
1483 printk(KERN_DEBUG "%s is invalid\n", optstr); 1483 printk(KERN_DEBUG "%s is invalid\n", optstr);
1484 return -EINVAL; 1484 return -EINVAL;
1485 } 1485 }