Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760276Ab3CHCd7 (ORCPT ); Thu, 7 Mar 2013 21:33:59 -0500 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:46024 "EHLO e23smtp06.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759322Ab3CHCd6 (ORCPT ); Thu, 7 Mar 2013 21:33:58 -0500 Message-ID: <51394DF1.1030708@linux.vnet.ibm.com> Date: Fri, 08 Mar 2013 10:33:21 +0800 From: Michael Wang User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: Peter Zijlstra CC: LKML , Ingo Molnar , Mike Galbraith , Namhyung Kim , Alex Shi , Paul Turner , Andrew Morton , "Nikunj A. Dadhania" , Ram Pai Subject: Re: [PATCH] sched: wakeup buddy References: <5136EB06.2050905@linux.vnet.ibm.com> <1362676917.10972.23.camel@laptop> In-Reply-To: <1362676917.10972.23.camel@laptop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13030802-7014-0000-0000-000002B020AB Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 991 Lines: 36 On 03/08/2013 01:21 AM, Peter Zijlstra wrote: > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: >> +static inline int wakeup_related(struct task_struct *p) >> +{ >> + if (wakeup_buddy(p, current)) { >> + /* >> + * Now check whether current still focus on his buddy. >> + */ >> + if (wakeup_buddy(current, p)) >> + return 1; >> + } >> + >> + return 0; >> +} > > Not commenting on the thing in general, but: > > static inline bool wakeup_related(struct task_struct *p) > { > return wakeup_buddy(p, current) && wakeup_buddy(current, p); > } > > is far shorter and easier to read :-) Right, I will correct it :) Regards, Michael Wang > -- 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/