Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757171Ab0DVTdG (ORCPT ); Thu, 22 Apr 2010 15:33:06 -0400 Received: from kroah.org ([198.145.64.141]:41590 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756953Ab0DVT37 (ORCPT ); Thu, 22 Apr 2010 15:29:59 -0400 X-Mailbox-Line: From gregkh@kvm.kroah.org Thu Apr 22 12:09:24 2010 Message-Id: <20100422190924.083952138@kvm.kroah.org> User-Agent: quilt/0.48-4.4 Date: Thu, 22 Apr 2010 12:10:37 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, KOSAKI Motohiro , travis@sgi.com, peterz@infradead.org, drepper@redhat.com, rja@sgi.com, sharyath@in.ibm.com, steiner@sgi.com, Ingo Molnar Subject: [186/197] sched: Use proper type in sched_getaffinity() In-Reply-To: <20100422191857.GA13268@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1397 Lines: 46 2.6.32-stable review patch. If anyone has any objections, please let us know. ------------------ From: KOSAKI Motohiro 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 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 Signed-off-by: Greg Kroah-Hartman --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/