Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp946684pxa; Thu, 27 Aug 2020 22:12:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp7aQ6zFxnqbdmwvjz4dLLsggZjSGflofHaCrIq/rpTrbZ5y1Y6IlAIErVBjTiIZ2zLN7x X-Received: by 2002:a17:906:2b0d:: with SMTP id a13mr23490205ejg.433.1598591552808; Thu, 27 Aug 2020 22:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598591552; cv=none; d=google.com; s=arc-20160816; b=chEJ9SZxi0S8QkQwQQotpdTP0tiIkwrnzWBFVgVk5VlMXdl25TrVG876jQ2MgQ98V1 M+xUpeTLEQGUP4j+aKwU88szE3MxOWVA0WiKIlxNZKFRtcF10Y4lHyIqHXIBsNrs9D41 MWqsTRz6qJKfMPjDZuqFvZ3hdSyHPV7z0+Msh3n+kQY9zJEfbM1+Wbrd7M2z9Z4KtqxC HcSOArR+l4KlvyT/qoBH6VLoKyEkz9qex8XDJQ7sOPjO+vqLuWBYyPm3OqRnFxlBOIZ1 T7oOeN5h7ZIz/HdDFUCkEgf0t5MPIMhFOx5URKxH+RSUVAghe9EvaF2le0Ac/ncRjjDl 1Dfw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M4xpwJ3VfAAdK51sDF+C1DZUS1S/ZC/8+tu65yMzW6Q=; b=Oc1rZwa7lz8jolhT5g4snkQlklRk/BV1efGaT951FbK8c830gzeaeLJbz8VpiFyhYK Gs32zV7wM0IdyHS0qxs5vs1W5zU8kZsilDKAKwNsTqhJqy2RfeCN5AJj5Ul8k7VbYsV0 /OYU5C9HRqgvWBsGGkDyv5lnZhyQQooBy4Z2UUleguBHFTHKbwCUMRPFmTRKs/TfEC1R G3XCcaSOXpKmrTvWCIQI5J70c3SaS3m96x8hqaNkxyEcfgP9j0RIAZl4C0mzzSxsIJBD gwOJNqDxn9DO7Qx8isz4MhkSeUVUBcnnJ5uHfYloYma48UMG2KQnUZwL2T5byD3io53V R9dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K2gzEacc; 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 bu20si2641869edb.537.2020.08.27.22.11.57; Thu, 27 Aug 2020 22:12:32 -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=K2gzEacc; 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 S1726481AbgH1FJl (ORCPT + 99 others); Fri, 28 Aug 2020 01:09:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725849AbgH1FJj (ORCPT ); Fri, 28 Aug 2020 01:09:39 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF27EC061264 for ; Thu, 27 Aug 2020 22:09:38 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id ls14so47764pjb.3 for ; Thu, 27 Aug 2020 22:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M4xpwJ3VfAAdK51sDF+C1DZUS1S/ZC/8+tu65yMzW6Q=; b=K2gzEaccXAzpM1PQKdX7+cdYjofnz8Ui+aHuJMoA3db3qIRpYO7uXsRRS2oeRd1+Kg tyDH5wJu5u4A79RbPTcSy7CaDVTjECOl6uhJUMAfizV8VWLo56q3Bq7RpYLRWrNh9Vu6 k+/CVMNXc0GddYXwBt3TybTzrKC2/i8rzDXyn5SS5VnXbShluYzlb5nm+obLPEKGpRly kne1v0GyDwyIen+xVKM1xW5Savv5e/jTs99enzM9JIoY/jtBEIK4U4YMAyR24sDrdk4O 0TRxYJ84UcYwYsShEdMcbphU+/6shloh+B05VrYkfgdJURWwli/5ZQYnq87LI5HTnSgf J1Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M4xpwJ3VfAAdK51sDF+C1DZUS1S/ZC/8+tu65yMzW6Q=; b=AfnODhhzf0p3PfbL8n0tPRuBnbMp9/fi/9o65dQ1SjebhrVtS7tNIVpcFE4nLcFYnI 9k7Buu7U50YuZVBDBG2WKn7tt07hoKoA7BoznfLR1ULSE2URerzdpW3In+KhPcMALfJ5 sevXWo34muVwfDr//1F2vRhfWFRbT9Z6x4n0epejnZ/rmRYh5SgWz1ANm/V0mmqd0LNU 88P8kplnlHVWz0MVb03nPU6Cb3z58v/cDSbHMlWw+qL0Krr5OZIidIfTnS8Pin01MkGP PCjCzfpwb7TD/fcm1iE6rjvCljlwL3dC/EEF6sqjbSgJOSx4P4h0yCyftuk9/OWGuqu6 RRWA== X-Gm-Message-State: AOAM533r4kg1r2uA7fLp23mv2VMKGRyvX8x8Mg4d25ZJOIT44WOQYJB0 J2NzmC9pgfDh31/aY+KHB5u3tg== X-Received: by 2002:a17:90a:4314:: with SMTP id q20mr131480pjg.49.1598591378247; Thu, 27 Aug 2020 22:09:38 -0700 (PDT) Received: from localhost ([122.167.135.199]) by smtp.gmail.com with ESMTPSA id n17sm101436pgg.6.2020.08.27.22.09.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Aug 2020 22:09:37 -0700 (PDT) Date: Fri, 28 Aug 2020 10:39:35 +0530 From: Viresh Kumar To: Douglas Anderson Cc: Ulf Hansson , arnd@arndb.de, naresh.kamboju@linaro.org, vbadigan@codeaurora.org, rnayak@codeaurora.org, Adrian Hunter , Andy Gross , Bjorn Andersson , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Subject: Re: [PATCH] mmc: sdhci-msm: When dev_pm_opp_of_add_table() returns 0 it's not an error Message-ID: <20200828050935.m32njmxdrgbudw4r@vireshk-i7> References: <20200827083330.1.I669bb4dc3d92bd04e9a695f97904797dc8241b79@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200827083330.1.I669bb4dc3d92bd04e9a695f97904797dc8241b79@changeid> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? -- viresh