Skip to content

Commit 164109e

Browse files
Daniel Waltertorvalds
authored andcommitted
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>
1 parent 1618bd5 commit 164109e

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎arch/x86/kernel/cpu/intel_cacheinfo.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static ssize_t store_cache_disable(struct _cpuid4_info *this_leaf,
461461

462462
cpu = cpumask_first(to_cpumask(this_leaf->shared_cpu_map));
463463

464-
if (strict_strtoul(buf, 10, &val) < 0)
464+
if (kstrtoul(buf, 10, &val) < 0)
465465
return -EINVAL;
466466

467467
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,
511511
if (!this_leaf->base.nb || !amd_nb_has_feature(AMD_NB_L3_PARTITIONING))
512512
return -EINVAL;
513513

514-
if (strict_strtoul(buf, 16, &val) < 0)
514+
if (kstrtoul(buf, 16, &val) < 0)
515515
return -EINVAL;
516516

517517
if (amd_set_subcaches(cpu, val))

‎arch/x86/kernel/cpu/mcheck/mce.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ static ssize_t set_bank(struct device *s, struct device_attribute *attr,
21362136
{
21372137
u64 new;
21382138

2139-
if (strict_strtoull(buf, 0, &new) < 0)
2139+
if (kstrtou64(buf, 0, &new) < 0)
21402140
return -EINVAL;
21412141

21422142
attr_to_bank(attr)->ctl = new;
@@ -2174,7 +2174,7 @@ static ssize_t set_ignore_ce(struct device *s,
21742174
{
21752175
u64 new;
21762176

2177-
if (strict_strtoull(buf, 0, &new) < 0)
2177+
if (kstrtou64(buf, 0, &new) < 0)
21782178
return -EINVAL;
21792179

21802180
if (mca_cfg.ignore_ce ^ !!new) {
@@ -2198,7 +2198,7 @@ static ssize_t set_cmci_disabled(struct device *s,
21982198
{
21992199
u64 new;
22002200

2201-
if (strict_strtoull(buf, 0, &new) < 0)
2201+
if (kstrtou64(buf, 0, &new) < 0)
22022202
return -EINVAL;
22032203

22042204
if (mca_cfg.cmci_disabled ^ !!new) {

‎arch/x86/kernel/cpu/mcheck/mce_amd.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ store_interrupt_enable(struct threshold_block *b, const char *buf, size_t size)
353353
if (!b->interrupt_capable)
354354
return -EINVAL;
355355

356-
if (strict_strtoul(buf, 0, &new) < 0)
356+
if (kstrtoul(buf, 0, &new) < 0)
357357
return -EINVAL;
358358

359359
b->interrupt_enable = !!new;
@@ -372,7 +372,7 @@ store_threshold_limit(struct threshold_block *b, const char *buf, size_t size)
372372
struct thresh_restart tr;
373373
unsigned long new;
374374

375-
if (strict_strtoul(buf, 0, &new) < 0)
375+
if (kstrtoul(buf, 0, &new) < 0)
376376
return -EINVAL;
377377

378378
if (new > THRESHOLD_MAX)

‎arch/x86/kvm/mmu_audit.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static int mmu_audit_set(const char *val, const struct kernel_param *kp)
273273
int ret;
274274
unsigned long enable;
275275

276-
ret = strict_strtoul(val, 10, &enable);
276+
ret = kstrtoul(val, 10, &enable);
277277
if (ret < 0)
278278
return -EINVAL;
279279

‎arch/x86/platform/uv/tlb_uv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user,
14791479
return count;
14801480
}
14811481

1482-
if (strict_strtol(optstr, 10, &input_arg) < 0) {
1482+
if (kstrtol(optstr, 10, &input_arg) < 0) {
14831483
printk(KERN_DEBUG "%s is invalid\n", optstr);
14841484
return -EINVAL;
14851485
}

0 commit comments

Comments
 (0)