From: Taniya Das <tdas@codeaurora.org>
To: Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Amit Nischal <anischal@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [v8] clk: qcom: clk-rpmh: Add QCOM RPMh clock driver
Date: Tue, 8 May 2018 22:27:36 +0530 [thread overview]
Message-ID: <ebdc6b56-f6d6-7e63-ebc2-6d60f5d1b690@codeaurora.org> (raw)
In-Reply-To: <152573930157.138124.12994299541712205183@swboyd.mtv.corp.google.com>
Hello Stephen,
Thanks for your review comments, please check my comments below, so
that I could submit the next patch series.
On 5/8/2018 5:58 AM, Stephen Boyd wrote:
> Quoting Taniya Das (2018-05-07 03:48:06)
>> Hello Stephen,
>>
>> Could you please let me know your comments on the below.
>>
>> On 5/4/2018 10:21 PM, Stephen Boyd wrote:
>>> Quoting Taniya Das (2018-05-04 03:02:38)
>>>> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
>>>> new file mode 100644
>>>> index 0000000..944fe04
>>>> --- /dev/null
>>>> +++ b/drivers/clk/qcom/clk-rpmh.c
>>>> @@ -0,0 +1,334 @@
>>>> +// SPDX-License-Identifier: GPL-2.0
>>>> +/*
>>>> + * Copyright (c) 2018, The Linux Foundation. All rights reserved.
>>>> + */
>>>> +
>>>> +};
>>>> +
>>>> +struct clk_rpmh_desc {
>>>> + struct clk_hw **clks;
>>>> + size_t num_clks;
>>>> +};
>>>
>>> This could be replaced with the clk_hw_onecell_data struct and then the
>>> only problem becomes the const part which seems pretty impossible to fix
>>> at this point. One "workaround" is to memdup the structure. Ugh.
>>>
>>
>> Will be okay, if I can the following?
>>
>> _probe...
>> {
>> struct clk_rpmh_desc *hw_desc_data;
>> ....
>>
>> hw_desc_data = kmemdup(desc, sizeof(*desc), GFP_KERNEL);
>>
>> ...
>> ret = devm_of_clk_add_hw_provider(&pdev->dev, of_clk_rpmh_hw_get,
>> hw_desc_data);
>> ....
>>
>> }
>>
>> And also I fix the "getter" function.
>
> I'd rather see the check for out of bounds number just go away, unless
> that's helping something. The kmemdup() doesn't look good.
>
I think it is better to copy the desc data to "clk_hw_onecell_data", as
I would also have to fix the "getter" function to check for out of bound
numbers (idx >= num_clks).
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
next prev parent reply other threads:[~2018-05-08 16:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 10:02 [v8] clk: qcom: clk-rpmh: Add QCOM RPMh clock driver Taniya Das
2018-05-04 10:02 ` Taniya Das
2018-05-04 16:51 ` Stephen Boyd
2018-05-07 10:48 ` Taniya Das
2018-05-08 0:28 ` Stephen Boyd
2018-05-08 16:57 ` Taniya Das [this message]
2018-05-08 17:43 ` 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=ebdc6b56-f6d6-7e63-ebc2-6d60f5d1b690@codeaurora.org \
--to=tdas@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=anischal@codeaurora.org \
--cc=david.brown@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rnayak@codeaurora.org \
--cc=sboyd@codeaurora.org \
--cc=sboyd@kernel.org \
/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