Skip to content

Commit 6072ddc

Browse files
Jingoo Hantorvalds
authored andcommitted
kernel: replace strict_strto*() with kstrto*()
The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 17766dd commit 6072ddc

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

kernel/gcov/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int __init gcov_persist_setup(char *str)
7474
{
7575
unsigned long val;
7676

77-
if (strict_strtoul(str, 0, &val)) {
77+
if (kstrtoul(str, 0, &val)) {
7878
pr_warning("invalid gcov_persist parameter '%s'\n", str);
7979
return 0;
8080
}

kernel/ksysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static ssize_t kexec_crash_size_store(struct kobject *kobj,
113113
unsigned long cnt;
114114
int ret;
115115

116-
if (strict_strtoul(buf, 0, &cnt))
116+
if (kstrtoul(buf, 0, &cnt))
117117
return -EINVAL;
118118

119119
ret = crash_shrink_memory(cnt);

kernel/params.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ int parse_args(const char *doing,
253253
EXPORT_SYMBOL(param_ops_##name)
254254

255255

256-
STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, strict_strtoul);
257-
STANDARD_PARAM_DEF(short, short, "%hi", long, strict_strtol);
258-
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, strict_strtoul);
259-
STANDARD_PARAM_DEF(int, int, "%i", long, strict_strtol);
260-
STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, strict_strtoul);
261-
STANDARD_PARAM_DEF(long, long, "%li", long, strict_strtol);
262-
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, strict_strtoul);
256+
STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, kstrtoul);
257+
STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtoul);
258+
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, kstrtoul);
259+
STANDARD_PARAM_DEF(int, int, "%i", long, kstrtoul);
260+
STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, kstrtoul);
261+
STANDARD_PARAM_DEF(long, long, "%li", long, kstrtoul);
262+
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, kstrtoul);
263263

264264
int param_set_charp(const char *val, const struct kernel_param *kp)
265265
{

0 commit comments

Comments
 (0)