diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2010-03-16 20:36:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 10:48:04 -0400 |
commit | e6b2d9c9a2e5689aa03d3d38b6c19dc86738a536 (patch) | |
tree | 785eb387d42e8e0d42e3fe6025efcbfb1fa1cdd8 /kernel | |
parent | 4c08f09270bdf83ca42a058970613cabe3fc8b41 (diff) |
sched: Use proper type in sched_getaffinity()
commit 8bc037fb89bb3104b9ae290d18c877624cd7d9cc upstream.
Using the proper type fixes the following compiler warning:
kernel/sched.c:4850: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: torvalds@linux-foundation.org
Cc: travis@sgi.com
Cc: peterz@infradead.org
Cc: drepper@redhat.com
Cc: rja@sgi.com
Cc: sharyath@in.ibm.com
Cc: steiner@sgi.com
LKML-Reference: <20100317090046.4C79.A69D9226@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f2f5a5f9e87e..da19c1e05a5a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6727,7 +6727,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, | |||
6727 | 6727 | ||
6728 | ret = sched_getaffinity(pid, mask); | 6728 | ret = sched_getaffinity(pid, mask); |
6729 | if (ret == 0) { | 6729 | if (ret == 0) { |
6730 | int retlen = min(len, cpumask_size()); | 6730 | size_t retlen = min_t(size_t, len, cpumask_size()); |
6731 | 6731 | ||
6732 | if (copy_to_user(user_mask_ptr, mask, retlen)) | 6732 | if (copy_to_user(user_mask_ptr, mask, retlen)) |
6733 | ret = -EFAULT; | 6733 | ret = -EFAULT; |