diff options
author | Dongsheng Yang <yangds.fnst@cn.fujitsu.com> | 2014-02-11 02:34:52 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-02-22 12:16:41 -0500 |
commit | 144818422bfa272531250473b888394c21e6fe19 (patch) | |
tree | ede0e6972af13dbebdf17c8300056eeddf270c5b /kernel/workqueue.c | |
parent | c4a4d2f43177f6165132c6d36a4d46963018f726 (diff) |
workqueue: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/6d85138180c00ce86975addab6e34b24b84f00a5.1392103744.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 193e977a10ea..3fa5b8f3aae3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -3225,7 +3225,7 @@ static ssize_t wq_nice_store(struct device *dev, struct device_attribute *attr, | |||
3225 | return -ENOMEM; | 3225 | return -ENOMEM; |
3226 | 3226 | ||
3227 | if (sscanf(buf, "%d", &attrs->nice) == 1 && | 3227 | if (sscanf(buf, "%d", &attrs->nice) == 1 && |
3228 | attrs->nice >= -20 && attrs->nice <= 19) | 3228 | attrs->nice >= MIN_NICE && attrs->nice <= MAX_NICE) |
3229 | ret = apply_workqueue_attrs(wq, attrs); | 3229 | ret = apply_workqueue_attrs(wq, attrs); |
3230 | else | 3230 | else |
3231 | ret = -EINVAL; | 3231 | ret = -EINVAL; |