[186/197] sched: Use proper type in sched_getaffinity()

From: Greg KH
Date: Thu Apr 22 2010 - 15:33:35 EST


2.6.32-stable review patch. If anyone has any objections, please let us know.

------------------

From: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
Cc: torvalds@xxxxxxxxxxxxxxxxxxxx
Cc: travis@xxxxxxx
Cc: peterz@xxxxxxxxxxxxx
Cc: drepper@xxxxxxxxxx
Cc: rja@xxxxxxx
Cc: sharyath@xxxxxxxxxx
Cc: steiner@xxxxxxx
LKML-Reference: <20100317090046.4C79.A69D9226@xxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
kernel/sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6677,7 +6677,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t

ret = sched_getaffinity(pid, mask);
if (ret == 0) {
- int retlen = min(len, cpumask_size());
+ size_t retlen = min_t(size_t, len, cpumask_size());

if (copy_to_user(user_mask_ptr, mask, retlen))
ret = -EFAULT;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/