public inbox for linux-pwm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put()
@ 2023-12-22 13:13 Sean Young
  2023-12-26 10:44 ` Florian Fainelli
  2024-01-03 12:28 ` Uwe Kleine-König
  0 siblings, 2 replies; 4+ messages in thread
From: Sean Young @ 2023-12-22 13:13 UTC (permalink / raw)
  To: Thierry Reding, Uwe Kleine-König, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list, Sean Young
  Cc: linux-pwm, linux-rpi-kernel, linux-arm-kernel, linux-kernel

devm_add_action_or_reset() already calls the action in the error case.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/
Fixes: fcc760729359 ("pwm: bcm2835: Allow PWM driver to be used in atomic context")
Signed-off-by: Sean Young <sean@mess.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-bcm2835.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 307c0bd5f885..283cf27f25ba 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -160,10 +160,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
 
 	ret = devm_add_action_or_reset(&pdev->dev, devm_clk_rate_exclusive_put,
 				       pc->clk);
-	if (ret) {
-		clk_rate_exclusive_put(pc->clk);
+	if (ret)
 		return ret;
-	}
 
 	pc->rate = clk_get_rate(pc->clk);
 	if (!pc->rate)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put()
  2023-12-22 13:13 [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() Sean Young
@ 2023-12-26 10:44 ` Florian Fainelli
  2024-01-03 12:28 ` Uwe Kleine-König
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2023-12-26 10:44 UTC (permalink / raw)
  To: Sean Young, Thierry Reding, Uwe Kleine-König, Ray Jui,
	Scott Branden, Broadcom internal kernel review list
  Cc: linux-pwm, linux-rpi-kernel, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]



On 12/22/2023 2:13 PM, Sean Young wrote:
> devm_add_action_or_reset() already calls the action in the error case.
> 
> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/
> Fixes: fcc760729359 ("pwm: bcm2835: Allow PWM driver to be used in atomic context")
> Signed-off-by: Sean Young <sean@mess.org>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put()
  2023-12-22 13:13 [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() Sean Young
  2023-12-26 10:44 ` Florian Fainelli
@ 2024-01-03 12:28 ` Uwe Kleine-König
  2024-01-13  8:36   ` Uwe Kleine-König
  1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2024-01-03 12:28 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Sean Young, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-pwm, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

Hello Thierry,

On Fri, Dec 22, 2023 at 01:13:11PM +0000, Sean Young wrote:
> devm_add_action_or_reset() already calls the action in the error case.
> 
> Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/
> Fixes: fcc760729359 ("pwm: bcm2835: Allow PWM driver to be used in atomic context")
> Signed-off-by: Sean Young <sean@mess.org>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/pwm/pwm-bcm2835.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
> index 307c0bd5f885..283cf27f25ba 100644
> --- a/drivers/pwm/pwm-bcm2835.c
> +++ b/drivers/pwm/pwm-bcm2835.c
> @@ -160,10 +160,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
>  
>  	ret = devm_add_action_or_reset(&pdev->dev, devm_clk_rate_exclusive_put,
>  				       pc->clk);
> -	if (ret) {
> -		clk_rate_exclusive_put(pc->clk);
> +	if (ret)
>  		return ret;
> -	}
>  
>  	pc->rate = clk_get_rate(pc->clk);
>  	if (!pc->rate)

this patch should be added to your for-next branch and then your PR for
the next merge window.

Also "pwm: linux/pwm.h: fix Excess kernel-doc description warning"
(Message-Id: 20231223050621.13994-1-rdunlap@infradead.org) should be
added IMHO.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put()
  2024-01-03 12:28 ` Uwe Kleine-König
@ 2024-01-13  8:36   ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2024-01-13  8:36 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Sean Young, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-pwm, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

Hello,

On Wed, Jan 03, 2024 at 01:28:25PM +0100, Uwe Kleine-König wrote:
> this patch should be added to your for-next branch and then your PR for
> the next merge window.

This was missed for the pwm/for-6.8-rc1 PR. I added it to my for-next
branch at
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
now with the intention to send it for inclusion in 6.8-rc after being in
next for a few days.

> Also "pwm: linux/pwm.h: fix Excess kernel-doc description warning"
> (Message-Id: 20231223050621.13994-1-rdunlap@infradead.org) should be
> added IMHO.

This one was already cared for.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-13  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 13:13 [PATCH v2] pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() Sean Young
2023-12-26 10:44 ` Florian Fainelli
2024-01-03 12:28 ` Uwe Kleine-König
2024-01-13  8:36   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox