linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare
@ 2020-12-31  8:53 Xu Wang
  2021-01-17 12:34 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Xu Wang @ 2020-12-31  8:53 UTC (permalink / raw)
  To: jic23, lars, pmeerw, mcoquelin.stm32, alexandre.torgue, krzk,
	andy.shevchenko, bobo.shaobowang, linux-stm32, linux-arm-kernel
  Cc: linux-kernel, linux-iio

ecause clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/iio/adc/stm32-dfsdm-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
index 42a7377704a4..bb925a11c8ae 100644
--- a/drivers/iio/adc/stm32-dfsdm-core.c
+++ b/drivers/iio/adc/stm32-dfsdm-core.c
@@ -117,8 +117,7 @@ static void stm32_dfsdm_clk_disable_unprepare(struct stm32_dfsdm *dfsdm)
 {
 	struct dfsdm_priv *priv = to_stm32_dfsdm_priv(dfsdm);
 
-	if (priv->aclk)
-		clk_disable_unprepare(priv->aclk);
+	clk_disable_unprepare(priv->aclk);
 	clk_disable_unprepare(priv->clk);
 }
 
-- 
2.17.1


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

* Re: [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare
  2020-12-31  8:53 [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare Xu Wang
@ 2021-01-17 12:34 ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2021-01-17 12:34 UTC (permalink / raw)
  To: Xu Wang
  Cc: lars, pmeerw, mcoquelin.stm32, alexandre.torgue, krzk,
	andy.shevchenko, bobo.shaobowang, linux-stm32, linux-arm-kernel,
	linux-kernel, linux-iio

On Thu, 31 Dec 2020 08:53:22 +0000
Xu Wang <vulab@iscas.ac.cn> wrote:

> ecause clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to see if we missed anything.

thanks,

Jonathan

> ---
>  drivers/iio/adc/stm32-dfsdm-core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
> index 42a7377704a4..bb925a11c8ae 100644
> --- a/drivers/iio/adc/stm32-dfsdm-core.c
> +++ b/drivers/iio/adc/stm32-dfsdm-core.c
> @@ -117,8 +117,7 @@ static void stm32_dfsdm_clk_disable_unprepare(struct stm32_dfsdm *dfsdm)
>  {
>  	struct dfsdm_priv *priv = to_stm32_dfsdm_priv(dfsdm);
>  
> -	if (priv->aclk)
> -		clk_disable_unprepare(priv->aclk);
> +	clk_disable_unprepare(priv->aclk);
>  	clk_disable_unprepare(priv->clk);
>  }
>  


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

* Re: [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare
  2020-12-18  9:41 Xu Wang
@ 2020-12-30 15:41 ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2020-12-30 15:41 UTC (permalink / raw)
  To: Xu Wang; +Cc: lars, pmeerw, mcoquelin.stm32, linux-kernel

On Fri, 18 Dec 2020 09:41:45 +0000
Xu Wang <vulab@iscas.ac.cn> wrote:

> ecause clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.
Please resend, making sure to cc linux-iio@vger.kernel.org

Thanks,

Jonathan

> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/iio/adc/stm32-dfsdm-core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
> index 42a7377704a4..bb925a11c8ae 100644
> --- a/drivers/iio/adc/stm32-dfsdm-core.c
> +++ b/drivers/iio/adc/stm32-dfsdm-core.c
> @@ -117,8 +117,7 @@ static void stm32_dfsdm_clk_disable_unprepare(struct stm32_dfsdm *dfsdm)
>  {
>  	struct dfsdm_priv *priv = to_stm32_dfsdm_priv(dfsdm);
>  
> -	if (priv->aclk)
> -		clk_disable_unprepare(priv->aclk);
> +	clk_disable_unprepare(priv->aclk);
>  	clk_disable_unprepare(priv->clk);
>  }
>  


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

* [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare
@ 2020-12-18  9:41 Xu Wang
  2020-12-30 15:41 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Xu Wang @ 2020-12-18  9:41 UTC (permalink / raw)
  To: jic23, lars, pmeerw, mcoquelin.stm32; +Cc: linux-kernel

ecause clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/iio/adc/stm32-dfsdm-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
index 42a7377704a4..bb925a11c8ae 100644
--- a/drivers/iio/adc/stm32-dfsdm-core.c
+++ b/drivers/iio/adc/stm32-dfsdm-core.c
@@ -117,8 +117,7 @@ static void stm32_dfsdm_clk_disable_unprepare(struct stm32_dfsdm *dfsdm)
 {
 	struct dfsdm_priv *priv = to_stm32_dfsdm_priv(dfsdm);
 
-	if (priv->aclk)
-		clk_disable_unprepare(priv->aclk);
+	clk_disable_unprepare(priv->aclk);
 	clk_disable_unprepare(priv->clk);
 }
 
-- 
2.17.1


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

end of thread, other threads:[~2021-01-17 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31  8:53 [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare Xu Wang
2021-01-17 12:34 ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2020-12-18  9:41 Xu Wang
2020-12-30 15:41 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).