kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Rajan Vaja <RAJANV@xilinx.com>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	Michal Simek <michals@xilinx.com>,
	"quanyang.wang@windriver.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-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] clk: zynqmp: pll: Remove some dead code
Date: Mon, 3 May 2021 07:50:12 +0200	[thread overview]
Message-ID: <d47c05e0-14b9-c64e-1468-4bae7db83840@wanadoo.fr> (raw)
In-Reply-To: <BYAPR02MB394182A55D073BC6061F6D76B75B9@BYAPR02MB3941.namprd02.prod.outlook.com>


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

  reply	other threads:[~2021-05-03  5:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-05-05 10:10     ` Rajan Vaja
2021-05-07  9:27 ` Michael Tretter
2021-06-25 23:09 ` 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=d47c05e0-14b9-c64e-1468-4bae7db83840@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=JOLLYS@xilinx.com \
    --cc=RAJANV@xilinx.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michals@xilinx.com \
    --cc=mturquette@baylibre.com \
    --cc=quanyang.wang@windriver.com \
    --cc=sboyd@kernel.org \
    --cc=shubhraj@xilinx.com \
    --cc=tejasp@xlnx.xilinx.com \
    /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 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).