All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	linux-clk@vger.kernel.org,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, kernel@pengutronix.de
Subject: Re: [PATCH 1/5] PM / devfreq: sun8i-a33-mbus: Simplify usage of clk_rate_exclusive_get()
Date: Tue, 12 Dec 2023 18:16:55 +0000	[thread overview]
Message-ID: <20231212181655.1a0d5971@donnerap.manchester.arm.com> (raw)
In-Reply-To: <5ef585a3d7bee42bac5be0e40efcfbc6e75adfff.1702400947.git.u.kleine-koenig@pengutronix.de>

On Tue, 12 Dec 2023 18:26:38 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

> clk_rate_exclusive_get() returns 0 unconditionally. So remove error
> handling. This prepares making clk_rate_exclusive_get() return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Looks alright to me:
Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  drivers/devfreq/sun8i-a33-mbus.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c
> index 13d32213139f..bbc577556944 100644
> --- a/drivers/devfreq/sun8i-a33-mbus.c
> +++ b/drivers/devfreq/sun8i-a33-mbus.c
> @@ -381,18 +381,10 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
>  				     "failed to enable bus clock\n");
>  
>  	/* Lock the DRAM clock rate to keep priv->nominal_bw in sync. */
> -	ret = clk_rate_exclusive_get(priv->clk_dram);
> -	if (ret) {
> -		err = "failed to lock dram clock rate\n";
> -		goto err_disable_bus;
> -	}
> +	clk_rate_exclusive_get(priv->clk_dram);
>  
>  	/* Lock the MBUS clock rate to keep MBUS_TMR_PERIOD in sync. */
> -	ret = clk_rate_exclusive_get(priv->clk_mbus);
> -	if (ret) {
> -		err = "failed to lock mbus clock rate\n";
> -		goto err_unlock_dram;
> -	}
> +	clk_rate_exclusive_get(priv->clk_mbus);
>  
>  	priv->gov_data.upthreshold	= 10;
>  	priv->gov_data.downdifferential	=  5;
> @@ -450,9 +442,7 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
>  	dev_pm_opp_remove_all_dynamic(dev);
>  err_unlock_mbus:
>  	clk_rate_exclusive_put(priv->clk_mbus);
> -err_unlock_dram:
>  	clk_rate_exclusive_put(priv->clk_dram);
> -err_disable_bus:
>  	clk_disable_unprepare(priv->clk_bus);
>  
>  	return dev_err_probe(dev, ret, err);


WARNING: multiple messages have this Message-ID (diff)
From: Andre Przywara <andre.przywara@arm.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	linux-clk@vger.kernel.org,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, kernel@pengutronix.de
Subject: Re: [PATCH 1/5] PM / devfreq: sun8i-a33-mbus: Simplify usage of clk_rate_exclusive_get()
Date: Tue, 12 Dec 2023 18:16:55 +0000	[thread overview]
Message-ID: <20231212181655.1a0d5971@donnerap.manchester.arm.com> (raw)
In-Reply-To: <5ef585a3d7bee42bac5be0e40efcfbc6e75adfff.1702400947.git.u.kleine-koenig@pengutronix.de>

On Tue, 12 Dec 2023 18:26:38 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

> clk_rate_exclusive_get() returns 0 unconditionally. So remove error
> handling. This prepares making clk_rate_exclusive_get() return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Looks alright to me:
Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  drivers/devfreq/sun8i-a33-mbus.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c
> index 13d32213139f..bbc577556944 100644
> --- a/drivers/devfreq/sun8i-a33-mbus.c
> +++ b/drivers/devfreq/sun8i-a33-mbus.c
> @@ -381,18 +381,10 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
>  				     "failed to enable bus clock\n");
>  
>  	/* Lock the DRAM clock rate to keep priv->nominal_bw in sync. */
> -	ret = clk_rate_exclusive_get(priv->clk_dram);
> -	if (ret) {
> -		err = "failed to lock dram clock rate\n";
> -		goto err_disable_bus;
> -	}
> +	clk_rate_exclusive_get(priv->clk_dram);
>  
>  	/* Lock the MBUS clock rate to keep MBUS_TMR_PERIOD in sync. */
> -	ret = clk_rate_exclusive_get(priv->clk_mbus);
> -	if (ret) {
> -		err = "failed to lock mbus clock rate\n";
> -		goto err_unlock_dram;
> -	}
> +	clk_rate_exclusive_get(priv->clk_mbus);
>  
>  	priv->gov_data.upthreshold	= 10;
>  	priv->gov_data.downdifferential	=  5;
> @@ -450,9 +442,7 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
>  	dev_pm_opp_remove_all_dynamic(dev);
>  err_unlock_mbus:
>  	clk_rate_exclusive_put(priv->clk_mbus);
> -err_unlock_dram:
>  	clk_rate_exclusive_put(priv->clk_dram);
> -err_disable_bus:
>  	clk_disable_unprepare(priv->clk_bus);
>  
>  	return dev_err_probe(dev, ret, err);


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-12-12 18:17 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 17:26 [PATCH 0/5] clk: Make clk_rate_exclusive_get() return void Uwe Kleine-König
2023-12-12 17:26 ` Uwe Kleine-König
2023-12-12 17:26 ` Uwe Kleine-König
2023-12-12 17:26 ` Uwe Kleine-König
2023-12-12 17:26 ` [PATCH 1/5] PM / devfreq: sun8i-a33-mbus: Simplify usage of clk_rate_exclusive_get() Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-12 18:16   ` Andre Przywara [this message]
2023-12-12 18:16     ` Andre Przywara
2023-12-12 17:26 ` [PATCH 2/5] drm/meson: " Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-12 17:26 ` [PATCH 3/5] memory: tegra210-emc: " Uwe Kleine-König
2023-12-13  6:11   ` Krzysztof Kozlowski
2023-12-15 12:50   ` kernel test robot
2023-12-12 17:26 ` [PATCH 4/5] memory: tegra30-emc: " Uwe Kleine-König
2023-12-13  6:11   ` Krzysztof Kozlowski
2023-12-15 14:20   ` kernel test robot
2023-12-12 17:26 ` [PATCH 5/5] clk: Make clk_rate_exclusive_get() return void Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-12 17:26   ` Uwe Kleine-König
2023-12-13  7:16 ` [PATCH 0/5] " Maxime Ripard
2023-12-13  7:16   ` Maxime Ripard
2023-12-13  7:16   ` Maxime Ripard
2023-12-13  7:16   ` Maxime Ripard
2023-12-13  7:43   ` Uwe Kleine-König
2023-12-13  7:43     ` Uwe Kleine-König
2023-12-13  7:43     ` Uwe Kleine-König
2023-12-13  7:43     ` Uwe Kleine-König
2023-12-13  8:36     ` Maxime Ripard
2023-12-13  8:36       ` Maxime Ripard
2023-12-13  8:36       ` Maxime Ripard
2023-12-13  8:36       ` Maxime Ripard
2023-12-13 11:08       ` Uwe Kleine-König
2023-12-13 11:08         ` Uwe Kleine-König
2023-12-13 11:08         ` Uwe Kleine-König
2023-12-13 11:08         ` Uwe Kleine-König
2023-12-13 11:54         ` Maxime Ripard
2023-12-13 11:54           ` Maxime Ripard
2023-12-13 11:54           ` Maxime Ripard
2023-12-13 11:54           ` Maxime Ripard
2023-12-13 15:52           ` Uwe Kleine-König
2023-12-13 15:52             ` Uwe Kleine-König
2023-12-13 15:52             ` Uwe Kleine-König
2023-12-13 15:52             ` Uwe Kleine-König
2023-12-15 12:34             ` Maxime Ripard
2023-12-15 12:34               ` Maxime Ripard
2023-12-15 12:34               ` Maxime Ripard
2023-12-15 12:34               ` Maxime Ripard
2023-12-15 15:15               ` Uwe Kleine-König
2023-12-15 15:15                 ` Uwe Kleine-König
2023-12-15 15:15                 ` Uwe Kleine-König
2023-12-15 15:15                 ` Uwe Kleine-König
2023-12-15 18:49                 ` Uwe Kleine-König
2023-12-15 18:49                   ` Uwe Kleine-König
2023-12-15 18:49                   ` Uwe Kleine-König
2023-12-15 18:49                   ` Uwe Kleine-König
2023-12-13 16:44       ` Neil Armstrong
2023-12-13 16:44         ` Neil Armstrong
2023-12-13 16:44         ` Neil Armstrong
2023-12-13 16:44         ` Neil Armstrong
2023-12-15  9:11         ` Maxime Ripard
2023-12-15  9:11           ` Maxime Ripard
2023-12-15  9:11           ` Maxime Ripard
2023-12-15  9:11           ` Maxime Ripard
2023-12-15  9:46         ` Jerome Brunet
2023-12-15  9:46           ` Jerome Brunet
2023-12-15  9:46           ` Jerome Brunet
2023-12-15  9:46           ` Jerome Brunet
2023-12-15  8:41   ` Jerome Brunet
2023-12-15  8:41     ` Jerome Brunet
2023-12-15  8:41     ` Jerome Brunet
2023-12-15  8:41     ` Jerome Brunet

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=20231212181655.1a0d5971@donnerap.manchester.arm.com \
    --to=andre.przywara@arm.com \
    --cc=cw00.choi@samsung.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux@armlinux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wens@csie.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: link
Be 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.