[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100317090046.4C79.A69D9226@jp.fujitsu.com>
Date: Wed, 17 Mar 2010 09:36:58 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: kosaki.motohiro@...fujitsu.com, mingo@...hat.com, hpa@...or.com,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
travis@....com, peterz@...radead.org, drepper@...hat.com,
rja@....com, sharyath@...ibm.com, akpm@...ux-foundation.org,
steiner@....com, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:sched/urgent] sched: sched_getaffinity(): Allow less than NR_CPUS length
>
> * tip-bot for KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com> wrote:
>
> > Commit-ID: cd3d8031eb4311e516329aee03c79a08333141f1
> > Gitweb: http://git.kernel.org/tip/cd3d8031eb4311e516329aee03c79a08333141f1
> > Author: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
> > AuthorDate: Fri, 12 Mar 2010 16:15:36 +0900
> > Committer: Ingo Molnar <mingo@...e.hu>
> > CommitDate: Mon, 15 Mar 2010 08:28:44 +0100
> >
> > sched: sched_getaffinity(): Allow less than NR_CPUS length
>
> > + int retlen = min(len, cpumask_size());
>
> this one causes:
>
> kernel/sched.c:4850: warning: comparison of distinct pointer types lacks a cast
Ahh, I'm sorry. attached fixing patch.
thanks.
============================
Subject: [PATCH] fix warning
fix following warning.
kernel/sched.c:4850: warning: comparison of distinct pointer types lacks
a cast
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
---
kernel/sched.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 34217f1..d1d5acd 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4912,7 +4912,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
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;
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists