Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1039373pxa; Fri, 28 Aug 2020 01:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1PdTZF8gDUiZoOVs+l7hxsKaABHX4jMlhfevoBPooe5rCKEeAs+uSLq5aaEE0rYG/sdlB X-Received: by 2002:a17:906:b09:: with SMTP id u9mr706614ejg.76.1598604342460; Fri, 28 Aug 2020 01:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598604342; cv=none; d=google.com; s=arc-20160816; b=kSgaoiO9FaFQo3f9WRtvV+OVyJdWgu0rSPg5iOkFXUyFBLpTmfVTL9MKL9EKXT1khp WPzRbgIOTnRrSNTdp/dmHeS6EWWZIyZplE1q5TcqIQGFeouTNZwRTnoj3jZk/1IyfVsi pZEy16r/nEFvLa29E3baybBXHdZtfVXQTkWH1FGf9COa8EU8GRa9S+cJ8rF4OzphAJU4 17cEglNKHbWQpD3IFXBQHZZsOO5OJ0KuJkaluQh23MT92LCf/PF9nde3Ic5gF5dleXpP O/EdYk6sX+uVViLpcO5iQGLNnxAtQsb6zBg4kmeo4eKT6razPE1KRG3DpiWSm44zivrD R0GQ== 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=uTWUI5230ITwP2yP66ukJ+wNHyXX/sqNoITAtXVuFps=; b=HXcef+QpgUQ2JYIibz3L03A40BQsxsrxOIkxK7j5x4D5heBKI78LD5qrb8XcDo6yRI qcH9SIG9HneGx+yUQe3rhK80UsmXctC2liRvC5e3G2hOz1Bi8yKea8AkuzGHCnU/e08I febypamouWbGZVoiQNWq7vM9hiFZKHcupUOgfEPVrgwf+9wHGoxYCrTyB68scYT4GYGp 4OoxG8RvC5B/ZHrRjWfW+ZUeU7BSyDKhD3xUZLbSIcjJt9pTLlJ80RyT5qJgTVqvsVin AB5iKSfHVWPyxUOD/E+FI5arpDeB2d5C04rmGdpxNtuNYY4H+0XaB6gmZX4DgfRcF5be kYMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rL15LOzC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k29si150667edj.389.2020.08.28.01.45.19; Fri, 28 Aug 2020 01:45:42 -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; dkim=pass header.i=@linaro.org header.s=google header.b=rL15LOzC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728715AbgH1Ioj (ORCPT + 99 others); Fri, 28 Aug 2020 04:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728707AbgH1IoV (ORCPT ); Fri, 28 Aug 2020 04:44:21 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB391C061264 for ; Fri, 28 Aug 2020 01:44:21 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id k18so137742uao.11 for ; Fri, 28 Aug 2020 01:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uTWUI5230ITwP2yP66ukJ+wNHyXX/sqNoITAtXVuFps=; b=rL15LOzCdw6xdKRCWQazp27CLIKDRF/eM575VOML6XSrlwujYfvPyV6ZMwSTNFGTfh Qpu3kZC+zFXQc4Whiw7JUr8liH2f/OoYv09CShh+CTJ5h2dGykBurLwF78MFoVXR6yeF T7xZ/LQaxVsDNgatt2q5xb9u5YecVoHTiCi39TdNtztkzpxEmaAYdbBzrdRrwfO2E/hb t0kn0QS02+/hRdKWze5VgjUdHqtvxAFwdrY5fSV8njnzbNX0Ynr0JGOzoyFuHCetJ8RT o2CnKaWNcV+3FC1snIr4weAmUJNZv1pBtczTVxnWfMVeBrfuzGV0aFWACzwXUg+rOvCA DuTQ== 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=uTWUI5230ITwP2yP66ukJ+wNHyXX/sqNoITAtXVuFps=; b=IAFRwwxk5d8Syf6nAGmjL/E505bPx5GIVjjVh3BHKKZdXmDtoBzx0mMKVWnXX4yiQQ Yyapd5muXljI1YqZS1YozfO0drUl+28C+s9LygiCqKELiXenP0H+aCGUUddOdUlgnJRa vfXWjsVDQkHW+yCB/o8nQ+hXqDKa7nL/SLUvyA+XgF+fzZbuD7wynWoEIxjeupjb4kzu H01RcEfhoYkfqrVvnjqXx+k+0xMraUSd0kdWR92B4FTKDqZetkHd1ZSs83j7qik1aRv2 RYqkQtY7vX8xTN9yWx0ai+jNyKSP5kHL5EXXwbc8oPtiSawhC9DTlJQtiQ4EeAVIvMEX RrWQ== X-Gm-Message-State: AOAM530wIqxi1o0LEbKUwh3P6/T6DRyxyKAL/rFPAhM2n67ZUy3RGUSJ 6lWPD70i4VmpphaqD2hgZ0IKz2Xea8q5ysOwNIHQkQ== X-Received: by 2002:a9f:2190:: with SMTP id 16mr283460uac.19.1598604260956; Fri, 28 Aug 2020 01:44:20 -0700 (PDT) MIME-Version: 1.0 References: <20200827083330.1.I669bb4dc3d92bd04e9a695f97904797dc8241b79@changeid> <20200828050935.m32njmxdrgbudw4r@vireshk-i7> In-Reply-To: <20200828050935.m32njmxdrgbudw4r@vireshk-i7> From: Ulf Hansson Date: Fri, 28 Aug 2020 10:43:44 +0200 Message-ID: Subject: Re: [PATCH] mmc: sdhci-msm: When dev_pm_opp_of_add_table() returns 0 it's not an error To: Viresh Kumar , Douglas Anderson , Naresh Kamboju Cc: Arnd Bergmann , Veerabhadrarao Badiganti , Rajendra Nayak , Adrian Hunter , Andy Gross , Bjorn Andersson , linux-arm-msm , Linux Kernel Mailing List , "linux-mmc@vger.kernel.org" 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 Fri, 28 Aug 2020 at 07:09, Viresh Kumar wrote: > > On 27-08-20, 08:33, Douglas Anderson wrote: > > The commit d05a7238fe1c ("mmc: sdhci-msm: Unconditionally call > > dev_pm_opp_of_remove_table()") works fine in the case where there is > > no OPP table. However, if there is an OPP table then > > dev_pm_opp_of_add_table() will return 0. Since 0 != -ENODEV then the > > "if (ret != -ENODEV)" will evaluate to true and we'll fall into the > > error case. Oops. > > > > Let's fix this. > > > > Fixes: d05a7238fe1c ("mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()") > > Signed-off-by: Douglas Anderson > > --- > > > > drivers/mmc/host/sdhci-msm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > > index b7e47107a31a..55101dba42bd 100644 > > --- a/drivers/mmc/host/sdhci-msm.c > > +++ b/drivers/mmc/host/sdhci-msm.c > > @@ -2284,7 +2284,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) > > > > /* OPP table is optional */ > > ret = dev_pm_opp_of_add_table(&pdev->dev); > > - if (ret != -ENODEV) { > > + if (ret && ret != -ENODEV) { > > dev_err(&pdev->dev, "Invalid OPP table in Device tree\n"); > > goto opp_cleanup; > > } > > Wow! > > How many bugs did I introduce with a simple patch :( > > @Ulf, since this is material for 5.10 I was planning to resend the > original patch itself with all the things fixed. Will you be able to > rebase your tree? Or do you want to apply fixes separately ? I have rebased my tree, to get rid of the problems completely. Thanks everybody for helping out! Kind regards Uffe