From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754468AbeAQRz7 (ORCPT ); Wed, 17 Jan 2018 12:55:59 -0500 Received: from vern.gendns.com ([206.190.152.46]:52926 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754294AbeAQRz4 (ORCPT ); Wed, 17 Jan 2018 12:55:56 -0500 Subject: Re: [3/5] clk: divider: add divider_ro_round_rate helper To: Jerome Brunet , Stephen Boyd , Michael Turquette , linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Vladimir Zapolskiy , Sylvain Lemieux , Andy Gross , David Brown References: <20180105170959.17266-4-jbrunet@baylibre.com> <1516211221.2608.140.camel@baylibre.com> From: David Lechner Message-ID: Date: Wed, 17 Jan 2018 11:55:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1516211221.2608.140.camel@baylibre.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/17/2018 11:47 AM, Jerome Brunet wrote: > On Thu, 2018-01-11 at 17:08 -0600, David Lechner wrote: >> On 01/05/2018 11:09 AM, Jerome Brunet wrote: >>> Like divider_round_rate, a couple a of driver are doing more or less >>> the same operation to round the rate of the divider when it is read-only. >>> >>> We can factor this code so let's provide an helper function for this >> >> Perhaps you could also make use of this new helper here (clk-divider.c): >> >> const struct clk_ops clk_divider_ro_ops = { >> .recalc_rate = clk_divider_recalc_rate, >> .round_rate = clk_divider_round_rate, >> }; >> EXPORT_SYMBOL_GPL(clk_divider_ro_ops); > > The helper is used in this driver and ro_ops will use it. > I don't get this comment, could you be more specific I suppose I am trying to make things too complicated. Let's just forget about this.