Re: [PATCH v3 08/19] clk: tegra: add common infra for DT clocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/16/2013 08:34 AM, Peter De Schrijver wrote:
> On Tue, Oct 15, 2013 at 09:01:43PM +0200, Stephen Warren wrote:
>> On 10/15/2013 08:52 AM, Peter De Schrijver wrote:
>>> Introduce a common infrastructure for sharing clock initialization between
>>> SoCs.
>>
>>> diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
>>
>>> +struct clk ** __init tegra_lookup_dt_id(int clk_id,
>>> +					struct tegra_clk *tegra_clk)
>>> +{
>>> +	if (tegra_clk[clk_id].present)
>>> +		return &clks[tegra_clk[clk_id].dt_id];
>>> +	else
>>> +		return NULL;
>>
>> Does this need range-checking? Or do we assume that since this is an
>> internal function, "clk_id" will never be out-of-range?
> 
> That was my assumption indeed. I could add a range check if you think that's
> useful.

It's probably OK if it's a purely internal function; I just wanted to
double-check.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux