aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2011-05-26 19:25:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 20:12:36 -0400
commit0a8cb8e34149251ad1f280fe099a4f971554639a (patch)
tree9b99f0b9d7366d9049760fd06462b14b0e14a061 /fs/proc/base.c
parent57cc083ad9e1bfeeb4a0ee831e7bb008c8865bf0 (diff)
fs/proc: convert to kstrtoX()
Convert fs/proc/ from strict_strto*() to kstrto*() functions. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index c2ac2fb123c8..0c2c50cc2cca 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1059,7 +1059,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
1059{ 1059{
1060 struct task_struct *task; 1060 struct task_struct *task;
1061 char buffer[PROC_NUMBUF]; 1061 char buffer[PROC_NUMBUF];
1062 long oom_adjust; 1062 int oom_adjust;
1063 unsigned long flags; 1063 unsigned long flags;
1064 int err; 1064 int err;
1065 1065
@@ -1071,7 +1071,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
1071 goto out; 1071 goto out;
1072 } 1072 }
1073 1073
1074 err = strict_strtol(strstrip(buffer), 0, &oom_adjust); 1074 err = kstrtoint(strstrip(buffer), 0, &oom_adjust);
1075 if (err) 1075 if (err)
1076 goto out; 1076 goto out;
1077 if ((oom_adjust < OOM_ADJUST_MIN || oom_adjust > OOM_ADJUST_MAX) && 1077 if ((oom_adjust < OOM_ADJUST_MIN || oom_adjust > OOM_ADJUST_MAX) &&
@@ -1168,7 +1168,7 @@ static ssize_t oom_score_adj_write(struct file *file, const char __user *buf,
1168 struct task_struct *task; 1168 struct task_struct *task;
1169 char buffer[PROC_NUMBUF]; 1169 char buffer[PROC_NUMBUF];
1170 unsigned long flags; 1170 unsigned long flags;
1171 long oom_score_adj; 1171 int oom_score_adj;
1172 int err; 1172 int err;
1173 1173
1174 memset(buffer, 0, sizeof(buffer)); 1174 memset(buffer, 0, sizeof(buffer));
@@ -1179,7 +1179,7 @@ static ssize_t oom_score_adj_write(struct file *file, const char __user *buf,
1179 goto out; 1179 goto out;
1180 } 1180 }
1181 1181
1182 err = strict_strtol(strstrip(buffer), 0, &oom_score_adj); 1182 err = kstrtoint(strstrip(buffer), 0, &oom_score_adj);
1183 if (err) 1183 if (err)
1184 goto out; 1184 goto out;
1185 if (oom_score_adj < OOM_SCORE_ADJ_MIN || 1185 if (oom_score_adj < OOM_SCORE_ADJ_MIN ||
@@ -1468,7 +1468,7 @@ sched_autogroup_write(struct file *file, const char __user *buf,
1468 struct inode *inode = file->f_path.dentry->d_inode; 1468 struct inode *inode = file->f_path.dentry->d_inode;
1469 struct task_struct *p; 1469 struct task_struct *p;
1470 char buffer[PROC_NUMBUF]; 1470 char buffer[PROC_NUMBUF];
1471 long nice; 1471 int nice;
1472 int err; 1472 int err;
1473 1473
1474 memset(buffer, 0, sizeof(buffer)); 1474 memset(buffer, 0, sizeof(buffer));
@@ -1477,9 +1477,9 @@ sched_autogroup_write(struct file *file, const char __user *buf,
1477 if (copy_from_user(buffer, buf, count)) 1477 if (copy_from_user(buffer, buf, count))
1478 return -EFAULT; 1478 return -EFAULT;
1479 1479
1480 err = strict_strtol(strstrip(buffer), 0, &nice); 1480 err = kstrtoint(strstrip(buffer), 0, &nice);
1481 if (err) 1481 if (err < 0)
1482 return -EINVAL; 1482 return err;
1483 1483
1484 p = get_proc_task(inode); 1484 p = get_proc_task(inode);
1485 if (!p) 1485 if (!p)