Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752441AbdGLNWh (ORCPT ); Wed, 12 Jul 2017 09:22:37 -0400 Received: from foss.arm.com ([217.140.101.70]:54856 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbdGLNWg (ORCPT ); Wed, 12 Jul 2017 09:22:36 -0400 Date: Wed, 12 Jul 2017 14:22:32 +0100 From: Juri Lelli To: Byungchul Park Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, juri.lelli@gmail.com, rostedt@goodmis.org, bristot@redhat.com, kernel-team@lge.com Subject: Re: [PATCH v5 2/4] sched/deadline: Change return value of cpudl_find() Message-ID: <20170712132232.kj6nxavxfglymsuy@e106622-lin> References: <1495504859-10960-1-git-send-email-byungchul.park@lge.com> <1495504859-10960-3-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1495504859-10960-3-git-send-email-byungchul.park@lge.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1216 Lines: 39 Hi, On 23/05/17 11:00, Byungchul Park wrote: > Currently cpudl_find() returns the best cpu that means it has the > maximum dl, however, the value is already kept in later_mask and the > return value is not referred directly any more. > > Now, it's enough to return whether CPUs were found or not, like rt. > I'd reword as cpudl_find() users are only interested in knowing if suitable CPU(s) were found or not (and then they look at later_mask to know which). Change cpudl_find() return type accordingly. > Signed-off-by: Byungchul Park > --- > kernel/sched/cpudeadline.c | 26 +++++++++++++------------- > kernel/sched/deadline.c | 6 +++--- > 2 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c > index fba235c..7408cbe 100644 > --- a/kernel/sched/cpudeadline.c > +++ b/kernel/sched/cpudeadline.c > @@ -119,29 +119,29 @@ static inline int cpudl_maximum(struct cpudl *cp) > * @p: the task > * @later_mask: a mask to fill in with the selected CPUs (or NULL) > * > - * Returns: int - best CPU (heap maximum if suitable) > + * Returns: (int)bool - CPUs were found Why not simply bool? Thanks, - Juri