Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10648663ybi; Thu, 25 Jul 2019 03:02:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzal7/w73UogK2eM+m+IScACa6GzeWftfnM7csYc33x1JeogU6ubUrpbJ8C3JByMXQmuaQ2 X-Received: by 2002:a17:902:fe93:: with SMTP id x19mr83705310plm.77.1564048969107; Thu, 25 Jul 2019 03:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564048969; cv=none; d=google.com; s=arc-20160816; b=Qz72/bpWtcrfTCx+e0SOok9Ig05iHmi6VT1vq0n/9n2MojR8TMBvw9545FqlW0qBVj n4Op5YRqrou9BcwwcVnIoQuQU2eMzvoziBEn9ykJlZ9YIJdF6kEGX726j2fLD8aPiFk+ TjFhpBXg2Ktk49hSAYk/Q93r68IkzPEorUCb9bL1/UcpKZuMe3EN224yr8XS9vFKnrCb LbuB5WCQAuVs6FpKguZLdF4WKkbyhWs/2P//Kh1pDWldIUZjcx6hgpr9kIgkuS3vpzvs yT1wWr8spnKaA+hrecVHCmr5GwzusUsLfupCi4l1faKUXYAUpFVwPc7zHncJvJEa+KeI IKKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LRGlx92bpWtLeBvquF1LUYpvq1tNqGHaDGUio5tA0mo=; b=rVVKD8PSXjDMRSz175q8fwY/cgYdzYuXQQLzBmggBmNtwUyuDsAOTncvpEDjBRv4Oq urnA+MRI1Ay1VxTNimLrnm9UCHDmX5lkHB1U27+V4hk6K+K87Ig9M2oDSqAz8LMA8YVm B1rfbxA2Z4aQmuTyX9u71bC2ITQ46oiA3qV77Q333ZbNUQQbEZazzxmZhLSgiDP677Iz d0fG+67fFbbtIZaewU0STM6n01KqCWUUz8yZ4JTE2bWy5hWQsaCO4KKlWc+lWebuLdrf NBMhEmkJNEzEEU1Ynk3GO7wN/8b5ilozGJweJhvp/QEif2wRedMCXGDuyhS/3c/xXvzg 20/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=bgnhfItc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b24si541716pfi.180.2019.07.25.03.02.26; Thu, 25 Jul 2019 03:02:49 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=bgnhfItc; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390191AbfGYD7M (ORCPT + 99 others); Wed, 24 Jul 2019 23:59:12 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:35801 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390182AbfGYD7L (ORCPT ); Wed, 24 Jul 2019 23:59:11 -0400 Received: by mail-ot1-f66.google.com with SMTP id j19so11751426otq.2 for ; Wed, 24 Jul 2019 20:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LRGlx92bpWtLeBvquF1LUYpvq1tNqGHaDGUio5tA0mo=; b=bgnhfItcojaHLZxH7HxI1thzfwiCyqNQurpzmd/6WbSuuZVZt4gkrivXlHwXpPZE7D R0fsL0AG3G2jt2u6AZdhn8id9aFbi+28AdOfmk/TGupLB9wH9e5NcvOU6O1pW5aVBWhY kFRDQYxCswSwU2pUUgsSXgu3EDxjOWVnB+F2OyXNjeqa0BrLYj8mw4ES6PerKuD877BX ksc7e/9s2lGxSMwwWuVnmQfXKJJ+IpNUj/qOuSAdEWbfwC6MkYyCR+H4omewB/Tz1j97 dqcC33kX6zxF1cjupa9m71cpTEykiTUqsCD6vAmwCm3lDIAomPJMFB6aCFx4ZvQ9idTR H9gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LRGlx92bpWtLeBvquF1LUYpvq1tNqGHaDGUio5tA0mo=; b=iWQAI16fDqGIY5GAbKEZKDZBMxNmT8SRE65nRmzm3dgQoJ29QuxOAyS7BEaLfgfcAB 2g6WjsDaBCiLXVRMKpwkPt8pUctPmrWtfOfZ8pInj96wEAbf518HTiZwnIpfHYHqVHuK 8d1clQTxx9gYps2B5vfzJXIycNkc/amB7UMpynHt4Gpsz9PL3CgPfN3k8VJ4FVQdtpQr CSnuKDtEbKcnY6vdxObUg2jofdpiR6SZN6806JPe9fuJ7EwWekl0Di+InZOfK5ofhhSW Qb86Uo9Y02+a66yyvdER2gibRnBqjoM/OETtDKVnX0L0X8mkXBOqZkocd+N/60V8Qkds mbRQ== X-Gm-Message-State: APjAAAWaBLQwwK2obNygyx+MmTTvu093G5auNkfFper5aklH4RsU+BNF RvsEEiPRWOhgbmDQgRY9NRb1tKSmQWpYsTZhBxLqfQ== X-Received: by 2002:a9d:6d06:: with SMTP id o6mr12979042otp.225.1564027150345; Wed, 24 Jul 2019 20:59:10 -0700 (PDT) MIME-Version: 1.0 References: <20190717222340.137578-1-saravanak@google.com> <20190717222340.137578-6-saravanak@google.com> <20190723100406.7zchvflrmoaipxek@vireshk-i7> <20190725030137.uz22iwvdv37fsw56@vireshk-i7> In-Reply-To: <20190725030137.uz22iwvdv37fsw56@vireshk-i7> From: Saravana Kannan Date: Wed, 24 Jul 2019 20:58:34 -0700 Message-ID: Subject: Re: [PATCH v3 5/5] PM / devfreq: Add required OPPs support to passive governor To: Viresh Kumar Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , Sibi Sankar , Android Kernel Team , Linux PM , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 8:01 PM Viresh Kumar wrote: > > On 23-07-19, 17:26, Saravana Kannan wrote: > > On Tue, Jul 23, 2019 at 3:04 AM Viresh Kumar wrote: > > > On 17-07-19, 15:23, Saravana Kannan wrote: > > > > /* > > > > @@ -56,13 +56,20 @@ static int devfreq_passive_get_target_freq(struct devfreq *devfreq, > > > > * list of parent device. Because in this case, *freq is temporary > > > > * value which is decided by ondemand governor. > > > > */ > > > > - opp = devfreq_recommended_opp(parent_devfreq->dev.parent, freq, 0); > > > > - if (IS_ERR(opp)) { > > > > - ret = PTR_ERR(opp); > > > > + p_opp = devfreq_recommended_opp(parent_devfreq->dev.parent, freq, 0); > > > > + if (IS_ERR(p_opp)) { > > > > + ret = PTR_ERR(p_opp); > > > > goto out; > > > > } > > > > > > > > - dev_pm_opp_put(opp); > > > > + if (devfreq->opp_table && parent_devfreq->opp_table) > > > > + opp = dev_pm_opp_xlate_opp(parent_devfreq->opp_table, > > > > + devfreq->opp_table, p_opp); > > > > > > you put p_opp right here. > > What about this comment ? Sorry, mixed this up with the other comment. Good point. Fixed. This unintentionally fixed a copy-pasta bug I had in the "out" path. -Saravana > > > > > > > Also shouldn't you try to get p_opp under the above if block only? As > > > that is the only user of it ? > > > > No, p_opp (used to be called opp) was used even before my changes. If > > there's no required-opps mapping this falls back to assuming the slave > > device OPP to pick should be the same index as the master device's > > opp. > > > > So I believe this patch is correct as-is. > > Right. > > -- > viresh