Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp694118pxx; Wed, 28 Oct 2020 14:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF1QdJTNEpev3VjPS2fCnznyey8FHWRDzUIbFtaVyjqf4rVKWdOAjGX0aSkC2Jqe0VpLiE X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr1013750edb.28.1603921415328; Wed, 28 Oct 2020 14:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603921415; cv=none; d=google.com; s=arc-20160816; b=OXpxJzrcgB8Aqb34XDYuVFQROPVlkTow0Z5FFq1l9VKZBmbdtPU329YH3l5lhSjyCf SNyFOmgqUEzhSyIB2+p8oF9MjIApywC8f0+NrERM6HlZb3+tsWwBtEuGb8h5Na/f2wm1 lWk6g/FLprbigRqDpyg+QSU+FDBuHKx8GjPx3PTvi4V9qfo3iHBbTKLlSKWMKRL4gAMt ZznozgkppQaPGU3wi2za6AF8m0VHSq8va7iUNQLx6sLN3kx4GCFqGS9zxp+ykf0eKj64 fUMsKSDD6RGcWbUOBRl/HLqQ/EVwBRfT2a2rNumioDPu1KlY2b4KxBziQl89SUa/5qku dDgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=SSc3KDrt/XikQ4UPVl3gZBAgUqoTOHB06/XfJ5LCHsg=; b=MS3vQK+tKtukTMTWKq+o3dnzxB6prjIVRi96IjBw/doMBD1E6fkYVQRZpgJt5ad69t CFQEx8OlGvS7/7CsqRKBzIhOkSB68KdbGtwVISzo/j4TOVARcBFmzq2HCscugQZly08f POxX7BudXEULQCODlIrTN1VerKd5PZLVjQL+erGlKUkEaeMWlJnxn1lFgo6QLZuhUXDd S322JZJXjozA1orVhKsuL/A6BesyZlj9Y2A2gAkSGrXnnSeo/IRIBF8E/VWaR1ZxZuWp hZVK6AYfrgHd9MrL9yjLQSr3sVR3oCmtYHsziO2CRjFKVKNsNR7oAvWJI8Bay/9wI3Nx wpZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc1si438295ejb.315.2020.10.28.14.43.13; Wed, 28 Oct 2020 14:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725779AbgJ1VmC (ORCPT + 99 others); Wed, 28 Oct 2020 17:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbgJ1Vl5 (ORCPT ); Wed, 28 Oct 2020 17:41:57 -0400 Received: from leibniz.telenet-ops.be (leibniz.telenet-ops.be [IPv6:2a02:1800:110:4::f00:d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5BFCC0613D1 for ; Wed, 28 Oct 2020 14:41:57 -0700 (PDT) Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4CLkR13vhgzMqwl8 for ; Wed, 28 Oct 2020 10:53:17 +0100 (CET) Received: from ramsan.of.borg ([84.195.186.194]) by xavier.telenet-ops.be with bizsmtp id lMtG2300W4C55Sk01MtGMp; Wed, 28 Oct 2020 10:53:17 +0100 Received: from geert (helo=localhost) by ramsan.of.borg with local-esmtp (Exim 4.93) (envelope-from ) id 1kXi8q-000lf0-Hq; Wed, 28 Oct 2020 10:53:16 +0100 Date: Wed, 28 Oct 2020 10:53:16 +0100 (CET) From: Geert Uytterhoeven To: Viresh Kumar cc: Rafael Wysocki , Viresh Kumar , Nishanth Menon , Stephen Boyd , linux-pm@vger.kernel.org, Vincent Guittot , Aisheng Dong , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH] opp: Don't always remove static OPPs in _of_add_opp_table_v1() In-Reply-To: <2c73ab54717ef358b118ea0cfb727b1427e7730a.1602648719.git.viresh.kumar@linaro.org> Message-ID: References: <2c73ab54717ef358b118ea0cfb727b1427e7730a.1602648719.git.viresh.kumar@linaro.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, On Wed, 14 Oct 2020, Viresh Kumar wrote: > The patch missed returning 0 early in case of success and hence the > static OPPs got removed by mistake. Fix it. > > Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()") > Reported-by: Aisheng Dong > Signed-off-by: Viresh Kumar This revives cpufreq on R-Car Gen2, and fixes a later s2ram regression in commit dc279ac6e5b4e06e ("cpufreq: dt: Refactor initialization to handle probe deferral properly"), where the PMIC is accessesed while the I2C controller is still suspended. Tested-by: Geert Uytterhoeven > --- a/drivers/opp/of.c > +++ b/drivers/opp/of.c > @@ -944,6 +944,8 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table) > nr -= 2; > } > > + return 0; > + > remove_static_opp: > _opp_remove_all_static(opp_table); > > -- > 2.25.0.rc1.19.g042ed3e048af Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds