kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: zynqmp: pll: Remove some dead code
@ 2021-05-01 11:24 Christophe JAILLET
  2021-05-03  4:56 ` Rajan Vaja
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christophe JAILLET @ 2021-05-01 11:24 UTC (permalink / raw)
  To: mturquette, sboyd, michal.simek, quanyang.wang, rajan.vaja,
	jolly.shah, tejasp, shubhrajyoti.datta
  Cc: linux-clk, linux-arm-kernel, linux-kernel, kernel-janitors,
	Christophe JAILLET

'clk_hw_set_rate_range()' does not return any error code and 'ret' is
known to be 0 at this point, so this message can never be displayed.

Remove it.

Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
HOWEVER, the message is about 'clk_set_rate_range()', not
'clk_hw_set_rate_range()'. So the message is maybe correct and the
'xxx_rate_range()' function incorrect.
---
 drivers/clk/zynqmp/pll.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c
index abe6afbf3407..af11e9400058 100644
--- a/drivers/clk/zynqmp/pll.c
+++ b/drivers/clk/zynqmp/pll.c
@@ -331,8 +331,6 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id,
 	}
 
 	clk_hw_set_rate_range(hw, PS_PLL_VCO_MIN, PS_PLL_VCO_MAX);
-	if (ret < 0)
-		pr_err("%s:ERROR clk_set_rate_range failed %d\n", name, ret);
 
 	return hw;
 }
-- 
2.30.2


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

* RE: [PATCH] clk: zynqmp: pll: Remove some dead code
  2021-05-01 11:24 [PATCH] clk: zynqmp: pll: Remove some dead code Christophe JAILLET
@ 2021-05-03  4:56 ` Rajan Vaja
  2021-05-03  5:50   ` Christophe JAILLET
  2021-05-07  9:27 ` Michael Tretter
  2021-06-25 23:09 ` Stephen Boyd
  2 siblings, 1 reply; 6+ messages in thread
From: Rajan Vaja @ 2021-05-03  4:56 UTC (permalink / raw)
  To: Christophe JAILLET, mturquette, sboyd, Michal Simek,
	quanyang.wang, Jolly Shah, Tejas Patel, Shubhrajyoti Datta
  Cc: linux-clk, linux-arm-kernel, linux-kernel, kernel-janitors

Hi,

Thanks for the patch.

> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Sent: 01 May 2021 04:55 PM
> To: mturquette@baylibre.com; sboyd@kernel.org; Michal Simek
> <michals@xilinx.com>; quanyang.wang@windriver.com; Rajan Vaja
> <RAJANV@xilinx.com>; Jolly Shah <JOLLYS@xilinx.com>; Tejas Patel
> <tejasp@xlnx.xilinx.com>; Shubhrajyoti Datta <shubhraj@xilinx.com>
> Cc: linux-clk@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET
> <christophe.jaillet@wanadoo.fr>
> Subject: [PATCH] clk: zynqmp: pll: Remove some dead code
> 
> 'clk_hw_set_rate_range()' does not return any error code and 'ret' is
> known to be 0 at this point, so this message can never be displayed.
> 
> Remove it.
> 
> Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> HOWEVER, the message is about 'clk_set_rate_range()', not
> 'clk_hw_set_rate_range()'. So the message is maybe correct and the
> 'xxx_rate_range()' function incorrect.
> ---
>  drivers/clk/zynqmp/pll.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c
> index abe6afbf3407..af11e9400058 100644
> --- a/drivers/clk/zynqmp/pll.c
> +++ b/drivers/clk/zynqmp/pll.c
> @@ -331,8 +331,6 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name,
> u32 clk_id,
>  	}
> 
>  	clk_hw_set_rate_range(hw, PS_PLL_VCO_MIN, PS_PLL_VCO_MAX);
> -	if (ret < 0)
> -		pr_err("%s:ERROR clk_set_rate_range failed %d\n", name, ret);
[Rajan] Instead of removing, can we get return value of clk_hw_set_rate_range() and
print in case of an error.

> 
>  	return hw;
>  }
> --
> 2.30.2


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

* Re: [PATCH] clk: zynqmp: pll: Remove some dead code
  2021-05-03  4:56 ` Rajan Vaja
@ 2021-05-03  5:50   ` Christophe JAILLET
  2021-05-05 10:10     ` Rajan Vaja
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe JAILLET @ 2021-05-03  5:50 UTC (permalink / raw)
  To: Rajan Vaja, mturquette, sboyd, Michal Simek, quanyang.wang,
	Jolly Shah, Tejas Patel, Shubhrajyoti Datta
  Cc: linux-clk, linux-arm-kernel, linux-kernel, kernel-janitors


Le 03/05/2021 à 06:56, Rajan Vaja a écrit :
> Hi,
>
> Thanks for the patch.
>
>> -----Original Message-----
>> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> Sent: 01 May 2021 04:55 PM
>> To: mturquette@baylibre.com; sboyd@kernel.org; Michal Simek
>> <michals@xilinx.com>; quanyang.wang@windriver.com; Rajan Vaja
>> <RAJANV@xilinx.com>; Jolly Shah <JOLLYS@xilinx.com>; Tejas Patel
>> <tejasp@xlnx.xilinx.com>; Shubhrajyoti Datta <shubhraj@xilinx.com>
>> Cc: linux-clk@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
>> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET
>> <christophe.jaillet@wanadoo.fr>
>> Subject: [PATCH] clk: zynqmp: pll: Remove some dead code
>>
>> 'clk_hw_set_rate_range()' does not return any error code and 'ret' is
>> known to be 0 at this point, so this message can never be displayed.
>>
>> Remove it.
>>
>> Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> HOWEVER, the message is about 'clk_set_rate_range()', not
>> 'clk_hw_set_rate_range()'. So the message is maybe correct and the
>> 'xxx_rate_range()' function incorrect.
>> ---
>>   drivers/clk/zynqmp/pll.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c
>> index abe6afbf3407..af11e9400058 100644
>> --- a/drivers/clk/zynqmp/pll.c
>> +++ b/drivers/clk/zynqmp/pll.c
>> @@ -331,8 +331,6 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name,
>> u32 clk_id,
>>   	}
>>
>>   	clk_hw_set_rate_range(hw, PS_PLL_VCO_MIN, PS_PLL_VCO_MAX);
>> -	if (ret < 0)
>> -		pr_err("%s:ERROR clk_set_rate_range failed %d\n", name, ret);
> [Rajan] Instead of removing, can we get return value of clk_hw_set_rate_range() and
> print in case of an error.

Hi,

if it was possible, it is what I would have proposed because it looks 
'logical'.

However, 'clk_hw_set_rate_range()' returns void.
Hence my comment about 'clk_hw_set_rate_range' being the correct 
function to call or not. (i.e. is the comment right and 
'clk_hw_set_rate_range' wrong?)

CJ



>>   	return hw;
>>   }
>> --
>> 2.30.2

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

* RE: [PATCH] clk: zynqmp: pll: Remove some dead code
  2021-05-03  5:50   ` Christophe JAILLET
@ 2021-05-05 10:10     ` Rajan Vaja
  0 siblings, 0 replies; 6+ messages in thread
From: Rajan Vaja @ 2021-05-05 10:10 UTC (permalink / raw)
  To: Christophe JAILLET, mturquette, sboyd, Michal Simek,
	quanyang.wang, Jolly Shah, Tejas Patel, Shubhrajyoti Datta
  Cc: linux-clk, linux-arm-kernel, linux-kernel, kernel-janitors

Hi Chris,

> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Sent: 03 May 2021 11:20 AM
> To: Rajan Vaja <RAJANV@xilinx.com>; mturquette@baylibre.com;
> sboyd@kernel.org; Michal Simek <michals@xilinx.com>;
> quanyang.wang@windriver.com; Jolly Shah <JOLLYS@xilinx.com>; Tejas Patel
> <tejasp@xlnx.xilinx.com>; Shubhrajyoti Datta <shubhraj@xilinx.com>
> Cc: linux-clk@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: Re: [PATCH] clk: zynqmp: pll: Remove some dead code
> 
> 
> Le 03/05/2021 à 06:56, Rajan Vaja a écrit :
> > Hi,
> >
> > Thanks for the patch.
> >
> >> -----Original Message-----
> >> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> >> Sent: 01 May 2021 04:55 PM
> >> To: mturquette@baylibre.com; sboyd@kernel.org; Michal Simek
> >> <michals@xilinx.com>; quanyang.wang@windriver.com; Rajan Vaja
> >> <RAJANV@xilinx.com>; Jolly Shah <JOLLYS@xilinx.com>; Tejas Patel
> >> <tejasp@xlnx.xilinx.com>; Shubhrajyoti Datta <shubhraj@xilinx.com>
> >> Cc: linux-clk@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> >> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET
> >> <christophe.jaillet@wanadoo.fr>
> >> Subject: [PATCH] clk: zynqmp: pll: Remove some dead code
> >>
> >> 'clk_hw_set_rate_range()' does not return any error code and 'ret' is
> >> known to be 0 at this point, so this message can never be displayed.
> >>
> >> Remove it.
> >>
> >> Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
> >> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> >> ---
> >> HOWEVER, the message is about 'clk_set_rate_range()', not
> >> 'clk_hw_set_rate_range()'. So the message is maybe correct and the
> >> 'xxx_rate_range()' function incorrect.
> >> ---
> >>   drivers/clk/zynqmp/pll.c | 2 --
> >>   1 file changed, 2 deletions(-)
> >>
> >> diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c
> >> index abe6afbf3407..af11e9400058 100644
> >> --- a/drivers/clk/zynqmp/pll.c
> >> +++ b/drivers/clk/zynqmp/pll.c
> >> @@ -331,8 +331,6 @@ struct clk_hw *zynqmp_clk_register_pll(const char
> *name,
> >> u32 clk_id,
> >>   	}
> >>
> >>   	clk_hw_set_rate_range(hw, PS_PLL_VCO_MIN, PS_PLL_VCO_MAX);
> >> -	if (ret < 0)
> >> -		pr_err("%s:ERROR clk_set_rate_range failed %d\n", name, ret);
> > [Rajan] Instead of removing, can we get return value of clk_hw_set_rate_range()
> and
> > print in case of an error.
> 
> Hi,
> 
> if it was possible, it is what I would have proposed because it looks
> 'logical'.
> 
> However, 'clk_hw_set_rate_range()' returns void.
> Hence my comment about 'clk_hw_set_rate_range' being the correct
> function to call or not. (i.e. is the comment right and
> 'clk_hw_set_rate_range' wrong?)
[Rajan] Thanks for the clarification. Then, it looks fine.

> 
> CJ
> 
> 
> 
> >>   	return hw;
> >>   }
> >> --
> >> 2.30.2

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

* Re: [PATCH] clk: zynqmp: pll: Remove some dead code
  2021-05-01 11:24 [PATCH] clk: zynqmp: pll: Remove some dead code Christophe JAILLET
  2021-05-03  4:56 ` Rajan Vaja
@ 2021-05-07  9:27 ` Michael Tretter
  2021-06-25 23:09 ` Stephen Boyd
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Tretter @ 2021-05-07  9:27 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: mturquette, sboyd, michal.simek, quanyang.wang, rajan.vaja,
	jolly.shah, tejasp, shubhrajyoti.datta, linux-clk,
	linux-arm-kernel, linux-kernel, kernel-janitors, kernel

On Sat, 01 May 2021 13:24:32 +0200, Christophe JAILLET wrote:
> 'clk_hw_set_rate_range()' does not return any error code and 'ret' is
> known to be 0 at this point, so this message can never be displayed.
> 
> Remove it.
> 
> Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>

> ---
> HOWEVER, the message is about 'clk_set_rate_range()', not
> 'clk_hw_set_rate_range()'. So the message is maybe correct and the
> 'xxx_rate_range()' function incorrect.

Thanks. The function is correct, as this is a clock provider and should use
the clk_hw. Removing the message is correct.

Michael

> ---
>  drivers/clk/zynqmp/pll.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/clk/zynqmp/pll.c b/drivers/clk/zynqmp/pll.c
> index abe6afbf3407..af11e9400058 100644
> --- a/drivers/clk/zynqmp/pll.c
> +++ b/drivers/clk/zynqmp/pll.c
> @@ -331,8 +331,6 @@ struct clk_hw *zynqmp_clk_register_pll(const char *name, u32 clk_id,
>  	}
>  
>  	clk_hw_set_rate_range(hw, PS_PLL_VCO_MIN, PS_PLL_VCO_MAX);
> -	if (ret < 0)
> -		pr_err("%s:ERROR clk_set_rate_range failed %d\n", name, ret);
>  
>  	return hw;
>  }
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH] clk: zynqmp: pll: Remove some dead code
  2021-05-01 11:24 [PATCH] clk: zynqmp: pll: Remove some dead code Christophe JAILLET
  2021-05-03  4:56 ` Rajan Vaja
  2021-05-07  9:27 ` Michael Tretter
@ 2021-06-25 23:09 ` Stephen Boyd
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2021-06-25 23:09 UTC (permalink / raw)
  To: Christophe JAILLET, jolly.shah, michal.simek, mturquette,
	quanyang.wang, rajan.vaja, shubhrajyoti.datta, tejasp
  Cc: linux-clk, linux-arm-kernel, linux-kernel, kernel-janitors,
	Christophe JAILLET

Quoting Christophe JAILLET (2021-05-01 04:24:32)
> 'clk_hw_set_rate_range()' does not return any error code and 'ret' is
> known to be 0 at this point, so this message can never be displayed.
> 
> Remove it.
> 
> Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---

Applied to clk-next

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

end of thread, other threads:[~2021-06-25 23:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 11:24 [PATCH] clk: zynqmp: pll: Remove some dead code Christophe JAILLET
2021-05-03  4:56 ` Rajan Vaja
2021-05-03  5:50   ` Christophe JAILLET
2021-05-05 10:10     ` Rajan Vaja
2021-05-07  9:27 ` Michael Tretter
2021-06-25 23:09 ` Stephen Boyd

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).