Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7155158ybi; Thu, 1 Aug 2019 04:04:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfT4uAJ83OCzWqgQN76dN8adGUCOY3eWb7ZToJ4rfz3YGIFg5AOhjGO4UadNmzlfz9YwaO X-Received: by 2002:aa7:93a8:: with SMTP id x8mr54440366pff.49.1564657466149; Thu, 01 Aug 2019 04:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564657466; cv=none; d=google.com; s=arc-20160816; b=yVp9PpjrLILPzazJiyXLIO57YVHvD34Gg9WILxyzsbZzg4GTifdVenfYI6uhAPQJ3P qYyEpoEFtk2cTmwddcB2e7UkqxoxYjeZ/D/mWRmn+XwJn7nYIcHWpowzs3ECf3Zl2Ppz GgIA1yeJwf/OiZ9fEwEH5KuP8OUB8Bkx2rs0D6b4cHqiladKErL90Yi6kQIzaseIEWUe Cj81is9qNvF4Vkmpin4VDehMIp3btypq1mLOMxUw/L4unTnidTSouu4w6et3snKvx0HQ 5dDdwRKZvmDS50Ro2N9QthmNNuR9UOKF1jEnWyJDVInTIrX9aVLq8+u/JVUdZTalJQmS lAng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zwKrUp/EHfLycjjdx+m7fYXJEXgbwTksLsHRSQ9B77I=; b=rwy56Z4BjOFZsvNm3bGd7FkXg6jA/DuLy0Fa2y3/ZiRxhIkqb7LRm3ZnLd3KEIEpB+ L9XZOjFgel4Tac7y+GcYDh1y8caL54buuUMnEpPbP11OLys8JXoqOOirETL/AduZ7PNl Ef1Wz29bD2XOgFGO/YmJiZX36xwk0caQXSJN+ElSmUKnfsfgXQGErIlUpXcR2b/rJR6Q +BjazRilX1nrXa1/yZPmuaF8slLc1a8PG+O7e3MTalYLVHZwVOb153h0akkBNZ+xwD/L dDsi8b8dgCGW9zzpFZ8cZCj3rSN4Y3bXnPxlXLaEdP26A6aaM1gfEK97D5cG/I51r+eh PvpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a191si34489682pge.93.2019.08.01.04.04.10; Thu, 01 Aug 2019 04:04:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731015AbfHAKkW (ORCPT + 99 others); Thu, 1 Aug 2019 06:40:22 -0400 Received: from foss.arm.com ([217.140.110.172]:33770 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbfHAKkW (ORCPT ); Thu, 1 Aug 2019 06:40:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A60AD1570; Thu, 1 Aug 2019 03:40:21 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 17FAC3F575; Thu, 1 Aug 2019 03:40:18 -0700 (PDT) Date: Thu, 1 Aug 2019 11:40:14 +0100 From: Patrick Bellasi To: Michal =?utf-8?Q?Koutn=C3=BD?= Cc: cgroups@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Alessio Balsini , Dietmar Eggemann , Morten Rasmussen , Quentin Perret , Joel Fernandes , Paul Turner , Steve Muckle , Suren Baghdasaryan , Todd Kjos , Peter Zijlstra , "Rafael J . Wysocki" , Tejun Heo , Vincent Guittot , Viresh Kumar , Juri Lelli , Ingo Molnar Subject: Re: [PATCH v12 1/6] sched/core: uclamp: Extend CPU's cgroup controller Message-ID: <20190801104014.amwvjdvabedsd5t7@e110439-lin> References: <20190718181748.28446-1-patrick.bellasi@arm.com> <20190718181748.28446-2-patrick.bellasi@arm.com> <20190725114104.GA32159@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190725114104.GA32159@blackbody.suse.cz> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25-Jul 13:41, Michal Koutn? wrote: > On Thu, Jul 18, 2019 at 07:17:43PM +0100, Patrick Bellasi wrote: > > +static ssize_t cpu_uclamp_min_write(struct kernfs_open_file *of, > > + char *buf, size_t nbytes, > > + loff_t off) > > +{ > > [...] > > +static ssize_t cpu_uclamp_max_write(struct kernfs_open_file *of, > > + char *buf, size_t nbytes, > > + loff_t off) > > +{ > > [...] > These two functions are almost identical yet not trivial. I think it > wouldn be better to have the code at one place only and distinguish by > the passed clamp_id. Good point, since the removal of the boundary checks on values we now have two identical methods. I'll factor our the common code in a single function. Cheers, Patrick -- #include Patrick Bellasi