From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81FB7C61DA4 for ; Thu, 2 Feb 2023 12:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+Vu2ienMvwuH/TQ/RfZSTMrU6tF5ChobXE8mH22qucQ=; b=nMCi87aCJ/xZi0 NBjNgf+MMuaJEIfany2R/XMiHrxLoyHTtnB67ihKIJzARp1EaWAnEWgU4ljbEjPnXO91QPxFLAjcF CxBZAfU+n/aCbI5axYJ1YeYmwDpeC/VieiQ0AoTtwEOmcsqMW8lqAoh74qFTX/tidcrOl8AxR4EGD yJuZfoszf2KUkxk+wvzxI8/BhAh8GqW+sHwwx5VgU/racDoG4GFDuw1u5PW2cxuPLw5CoDVvkl/Wi le2mz+EF8EgkofJUTUMDPik5518UZxUVAPFskvT13hYTJhBieKlHgrW/zeWKrZBKD9ZkPbSwSfPfZ MgsCwYYHKkCCN7e4plzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNYWh-00FjTh-Om; Thu, 02 Feb 2023 12:17:15 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNYWe-00FjRi-0t for linux-arm-kernel@lists.infradead.org; Thu, 02 Feb 2023 12:17:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 52DF5CE29EA; Thu, 2 Feb 2023 12:17:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95437C433EF; Thu, 2 Feb 2023 12:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675340227; bh=kXuVYOYprEDAERc9ptWyMD0dUfVOl7wsMQbwhSMi7eU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OEfzBbqOC8Hqklq9IWsxlHAenMXr143GgEE5GC9FLVByvD6w1OGp/BLIRQJPl2zKP RggMPeisymcQZCUneIu57XG3OcHTXx2kc2kK5Ui9PJENo8x0zJxUhniILVKlK1eYKa rZ1nov43rLlcQLG6F5iPV76qXesHS70hea+0Wv2i6C1gDLfDtshPHM2StvWUZzRgSi WTjuJ7xer7xYwz6L954tuYZCRhrXZ0VuZCX+FYEeWHUQTDqXdvbJW7BK166IrAqeUQ FRzV48SorFgR73bQnAmPJE1wUylAP6HohDjXIV+Oqqk25lSkzQCJyrA909aw9CKgSw PW4i3J7MnChhQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pNYWw-0001UF-Bx; Thu, 02 Feb 2023 13:17:31 +0100 Date: Thu, 2 Feb 2023 13:17:30 +0100 From: Johan Hovold To: Krzysztof Kozlowski Cc: Johan Hovold , Georgi Djakov , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Bjorn Andersson , Konrad Dybcio , Sylwester Nawrocki , Artur =?utf-8?B?xZp3aWdvxYQ=?= , Alim Akhtar , Thierry Reding , Jonathan Hunter , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 15/23] interconnect: exynos: fix registration race Message-ID: References: <20230201101559.15529-1-johan+linaro@kernel.org> <20230201101559.15529-16-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_041712_454327_177E645A X-CRM114-Status: GOOD ( 17.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 02, 2023 at 12:04:49PM +0100, Krzysztof Kozlowski wrote: > On 01/02/2023 11:15, Johan Hovold wrote: > > @@ -98,12 +98,13 @@ static int exynos_generic_icc_remove(struct platform_device *pdev) > > struct exynos_icc_priv *priv = platform_get_drvdata(pdev); > > struct icc_node *parent_node, *node = priv->node; > > > > + icc_provider_deregister(&priv->provider); > > + > > parent_node = exynos_icc_get_parent(priv->dev->parent->of_node); > > if (parent_node && !IS_ERR(parent_node)) > > icc_link_destroy(node, parent_node); > > > > icc_nodes_remove(&priv->provider); > > - icc_provider_del(&priv->provider); > > > > return 0; > > } > > @@ -132,15 +133,11 @@ static int exynos_generic_icc_probe(struct platform_device *pdev) > > provider->inter_set = true; > > provider->data = priv; > > > > - ret = icc_provider_add(provider); > > - if (ret < 0) > > - return ret; > > + icc_provider_init(provider); > > > > icc_node = icc_node_create(pdev->id); > > - if (IS_ERR(icc_node)) { > > - ret = PTR_ERR(icc_node); > > - goto err_prov_del; > > - } > > + if (IS_ERR(icc_node)) > > + return PTR_ERR(icc_node); > > > > priv->node = icc_node; > > icc_node->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOFn", > > @@ -171,14 +168,17 @@ static int exynos_generic_icc_probe(struct platform_device *pdev) > > goto err_pmqos_del; > > } > > > > + ret = icc_provider_register(provider); > > + if (ret < 0) > > + goto err_pmqos_del; > > If I understand correctly there is no need for icc_link_destroy() in > error path here, right? Even in case of probe retry (defer or whatever > reason) - the link will be removed with icc_nodes_remove()? Correct, it is no longer needed after the first patch in this series. The exynos driver was the only driver that bothered to remove links explicitly, all the others expected the interconnect framework to do so when destroying nodes even if that was not case until now. Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel