Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2431997pxy; Sun, 2 May 2021 22:55:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYxnUxIra6VyCW1U3h0nGxM7TZ4dmaz+ZSIXimTIRLDdQYukE2fgdbYaUPrwRLOovGpCp4 X-Received: by 2002:a17:90b:d81:: with SMTP id bg1mr19097445pjb.179.1620021353939; Sun, 02 May 2021 22:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620021353; cv=none; d=google.com; s=arc-20160816; b=ZbOf1Y1v4qahzXTcLQg4PsKHvt57bo9ZLDlwUHqKvuuDiLvkK4nBa/v+k+FE1dNRF0 jO6MsiLvKOoIP0k1qcitZxZ0bsNeW+e8rFDQoX3kO5egT31gm4L5LHo6VCzUE2Cw7UUi tBEQ1oHIh+nXUL9JVZgufxc9skUzjBkBnPLHg1YRTT8D3Q1bX8adbFepswijzztouWol oteBK8Oj/zgnLyoNWOr0euLEsb+e2MHbcggxQCPJDI+KtmZ9HwIRjVJkiz8BbiAi4tXg GC6YKn+oT63uvp0MKkcnesO7jkfvOlx0fG80CDvJZFXM3VOJ/hXq5A6zw8xCW/7yciyN NWog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=AP0nD+XauAPgnUvzPVO6/HgmmqbhBygUOfPnCRoi1YU=; b=IClV8iS/LJnr29DiYuSHTEE2lxDwAI9XzqIXjjmjW7jNdJjxoVOTVtkO+Li9sGc3CB nA9c7Ai01UblBFWjF6HCfxrewrsCDhTj3/Nr/GYG1NWuM38wfA3Hnj2trLx5BTLWqYl+ c5ZfNxLgE5fv04GHlWAZnVO8JtIAju1F5wWMGIvYH4prY+1vctTErFpwrXFGsIl4N5GK Zj4OcVNF4aR+xbYraeY2u3S6f5UxN6jUFz7eSrlA7VqdeNAVAqwLWKOmpzrbiWCda/gj cUZ9Sq20xfuBOj/DxqggPoC1YgrrwvB2IHADvQGGLJ9oEeljrOSdK4WkAfEoYhZfSvKQ z2dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si10231793pfa.1.2021.05.02.22.55.16; Sun, 02 May 2021 22:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbhECFvM (ORCPT + 99 others); Mon, 3 May 2021 01:51:12 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:32698 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229451AbhECFvM (ORCPT ); Mon, 3 May 2021 01:51:12 -0400 Received: from [192.168.1.18] ([86.243.172.93]) by mwinf5d70 with ME id 05qE2500A21Fzsu035qEXC; Mon, 03 May 2021 07:50:18 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 03 May 2021 07:50:18 +0200 X-ME-IP: 86.243.172.93 Subject: Re: [PATCH] clk: zynqmp: pll: Remove some dead code To: Rajan Vaja , "mturquette@baylibre.com" , "sboyd@kernel.org" , Michal Simek , "quanyang.wang@windriver.com" , Jolly Shah , Tejas Patel , Shubhrajyoti Datta Cc: "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" References: <71a9fed5f762a71248b8ac73c0a15af82f3ce1e2.1619867987.git.christophe.jaillet@wanadoo.fr> From: Christophe JAILLET Message-ID: Date: Mon, 3 May 2021 07:50:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 03/05/2021 à 06:56, Rajan Vaja a écrit : > Hi, > > Thanks for the patch. > >> -----Original Message----- >> From: Christophe JAILLET >> Sent: 01 May 2021 04:55 PM >> To: mturquette@baylibre.com; sboyd@kernel.org; Michal Simek >> ; quanyang.wang@windriver.com; Rajan Vaja >> ; Jolly Shah ; Tejas Patel >> ; Shubhrajyoti Datta >> Cc: linux-clk@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux- >> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET >> >> 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 >> --- >> 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