linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Taniya Das <tdas@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: Mon, 07 May 2018 17:28:21 -0700	[thread overview]
Message-ID: <152573930157.138124.12994299541712205183@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <a926924f-2033-acd6-67cb-210a5e487ebb@codeaurora.org>

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.

  reply	other threads:[~2018-05-08  0:28 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 [this message]
2018-05-08 16:57         ` Taniya Das
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=152573930157.138124.12994299541712205183@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.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=tdas@codeaurora.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;
as well as URLs for NNTP newsgroup(s).