Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967868Ab3E3IIj (ORCPT ); Thu, 30 May 2013 04:08:39 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:40962 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967842Ab3E3II0 (ORCPT ); Thu, 30 May 2013 04:08:26 -0400 Message-ID: <1369901305.22004.138.camel@joe-AO722> Subject: Re: [PATCH 1/4] sys: remove unnecesscary parameter of set_one_prio From: Joe Perches To: liguang Cc: "Paul E. McKenney" , David Howells , Thomas Gleixner , Andrew Morton , Michael Kerrisk , Dave Jones , Kees Cook , Cyrill Gorcunov , Al Viro , linux-kernel@vger.kernel.org Date: Thu, 30 May 2013 01:08:25 -0700 In-Reply-To: <1369900686-5936-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1369900686-5936-1-git-send-email-lig.fnst@cn.fujitsu.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 40 On Thu, 2013-05-30 at 15:58 +0800, liguang wrote: [] > diff --git a/kernel/sys.c b/kernel/sys.c [] > -static int set_one_prio(struct task_struct *p, int niceval, int error) > +static int set_one_prio(struct task_struct *p, int niceval) Umm, error is forwarded through do_each loops. Are you sure you can do this without changing any return code behaviors? [] > @@ -211,7 +209,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) > else > pgrp = task_pgrp(current); > do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { > - error = set_one_prio(p, niceval, error); > + error = set_one_prio(p, niceval); > } while_each_pid_thread(pgrp, PIDTYPE_PGID, p); > break; > case PRIO_USER: > @@ -225,7 +223,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) > > do_each_thread(g, p) { > if (uid_eq(task_uid(p), uid)) > - error = set_one_prio(p, niceval, error); > + error = set_one_prio(p, niceval); > } while_each_thread(g, p); > if (!uid_eq(uid, cred->uid)) > free_uid(user); /* For find_user() */ -- 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/