From: Abel Vesa <abel.vesa@nxp.com> To: Miaoqian Lin <linmq006@gmail.com> Cc: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Dong Aisheng <aisheng.dong@nxp.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: imx: scu: Fix pm_runtime_get_sync() error checking Date: Mon, 18 Apr 2022 14:54:34 +0300 [thread overview] Message-ID: <Yl1Rege1GhPwwU6n@abelvesa> (raw) In-Reply-To: <20220412065719.17735-1-linmq006@gmail.com> On 22-04-12 06:57:18, Miaoqian Lin wrote: > If the device is already in a runtime PM enabled state > pm_runtime_get_sync() will return 1, so a test for negative > value should be used to check for errors. > > Fixes: 78edeb080330 ("clk: imx: scu: add runtime pm support") > Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> > --- > drivers/clk/imx/clk-scu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c > index 083da31dc3ea..18c6190eeffd 100644 > --- a/drivers/clk/imx/clk-scu.c > +++ b/drivers/clk/imx/clk-scu.c > @@ -529,7 +529,7 @@ static int imx_clk_scu_probe(struct platform_device *pdev) > pm_runtime_enable(dev); > > ret = pm_runtime_get_sync(dev); > - if (ret) { > + if (ret < 0) { > pm_genpd_remove_device(dev); > pm_runtime_disable(dev); > return ret; > -- > 2.17.1 >
WARNING: multiple messages have this Message-ID (diff)
From: Abel Vesa <abel.vesa@nxp.com> To: Miaoqian Lin <linmq006@gmail.com> Cc: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Dong Aisheng <aisheng.dong@nxp.com>, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: imx: scu: Fix pm_runtime_get_sync() error checking Date: Mon, 18 Apr 2022 14:54:34 +0300 [thread overview] Message-ID: <Yl1Rege1GhPwwU6n@abelvesa> (raw) In-Reply-To: <20220412065719.17735-1-linmq006@gmail.com> On 22-04-12 06:57:18, Miaoqian Lin wrote: > If the device is already in a runtime PM enabled state > pm_runtime_get_sync() will return 1, so a test for negative > value should be used to check for errors. > > Fixes: 78edeb080330 ("clk: imx: scu: add runtime pm support") > Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> > --- > drivers/clk/imx/clk-scu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c > index 083da31dc3ea..18c6190eeffd 100644 > --- a/drivers/clk/imx/clk-scu.c > +++ b/drivers/clk/imx/clk-scu.c > @@ -529,7 +529,7 @@ static int imx_clk_scu_probe(struct platform_device *pdev) > pm_runtime_enable(dev); > > ret = pm_runtime_get_sync(dev); > - if (ret) { > + if (ret < 0) { > pm_genpd_remove_device(dev); > pm_runtime_disable(dev); > return ret; > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-18 11:54 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-12 6:57 [PATCH] clk: imx: scu: Fix pm_runtime_get_sync() error checking Miaoqian Lin 2022-04-12 6:57 ` Miaoqian Lin 2022-04-18 11:54 ` Abel Vesa [this message] 2022-04-18 11:54 ` Abel Vesa 2022-04-22 1:20 ` Stephen Boyd 2022-04-22 1:20 ` Stephen Boyd 2022-04-22 1:32 ` Miaoqian Lin 2022-04-22 1:32 ` Miaoqian Lin 2022-04-22 1:33 ` [PATCH v2] clk: imx: scu: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage Miaoqian Lin 2022-04-22 1:33 ` Miaoqian Lin 2022-04-22 1:44 ` Stephen Boyd 2022-04-22 1:44 ` Stephen Boyd 2022-04-22 1:59 ` Miaoqian Lin 2022-04-22 1:59 ` Miaoqian Lin 2022-04-23 2:23 ` Stephen Boyd 2022-04-23 2:23 ` Stephen Boyd
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=Yl1Rege1GhPwwU6n@abelvesa \ --to=abel.vesa@nxp.com \ --cc=aisheng.dong@nxp.com \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=linmq006@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mturquette@baylibre.com \ --cc=s.hauer@pengutronix.de \ --cc=sboyd@kernel.org \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.