Commit 8bc037fb89bb3104b9ae290d18c877624cd7d9cc
Committed by
Ingo Molnar
1 parent
c890692bf3
Exists in
master
and in
7 other branches
sched: Use proper type in sched_getaffinity()
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
kernel/sched.c
... | ... | @@ -4912,7 +4912,7 @@ |
4912 | 4912 | |
4913 | 4913 | ret = sched_getaffinity(pid, mask); |
4914 | 4914 | if (ret == 0) { |
4915 | - int retlen = min(len, cpumask_size()); | |
4915 | + size_t retlen = min_t(size_t, len, cpumask_size()); | |
4916 | 4916 | |
4917 | 4917 | if (copy_to_user(user_mask_ptr, mask, retlen)) |
4918 | 4918 | ret = -EFAULT; |