lkml.org 
[lkml]   [2013]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 08/19] clk: tegra: add common infra for DT clocks
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?


\
 
 \ /
  Last update: 2013-10-15 21:21    [W:0.569 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site