From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: kosaki.motohiro@jp.fujitsu.com, mingo@redhat.com, hpa@zytor.com,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
travis@sgi.com, peterz@infradead.org, drepper@redhat.com,
rja@sgi.com, sharyath@in.ibm.com, akpm@linux-foundation.org,
steiner@sgi.com, tglx@linutronix.de,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/urgent] sched: sched_getaffinity(): Allow less than NR_CPUS length
Date: Wed, 17 Mar 2010 09:36:58 +0900 (JST) [thread overview]
Message-ID: <20100317090046.4C79.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20100316171034.GA17211@elte.hu>
>
> * tip-bot for KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> > Commit-ID: cd3d8031eb4311e516329aee03c79a08333141f1
> > Gitweb: http://git.kernel.org/tip/cd3d8031eb4311e516329aee03c79a08333141f1
> > Author: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > AuthorDate: Fri, 12 Mar 2010 16:15:36 +0900
> > Committer: Ingo Molnar <mingo@elte.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@jp.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
next prev parent reply other threads:[~2010-03-17 0:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 7:15 [PATCH] sched: sched_getaffinity() allow " KOSAKI Motohiro
2010-03-12 16:08 ` Ulrich Drepper
2010-03-15 7:43 ` [tip:sched/urgent] sched: sched_getaffinity(): Allow " tip-bot for KOSAKI Motohiro
2010-03-15 16:04 ` Jack Steiner
2010-03-15 16:17 ` Ulrich Drepper
2010-03-16 17:10 ` Ingo Molnar
2010-03-17 0:36 ` KOSAKI Motohiro [this message]
2010-03-17 10:03 ` [tip:sched/urgent] sched: Use proper type in sched_getaffinity() tip-bot for KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100317090046.4C79.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rja@sgi.com \
--cc=sharyath@in.ibm.com \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=travis@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®