From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH v3 03/19] clk: tegra: common periph_clk_enb_refcnt and clks Date: Tue, 15 Oct 2013 12:52:49 -0600 Message-ID: <525D8F01.8010603@wwwdotorg.org> References: <1381848794-11761-1-git-send-email-pdeschrijver@nvidia.com> <1381848794-11761-4-git-send-email-pdeschrijver@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1381848794-11761-4-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Peter De Schrijver Cc: Prashant Gaikwad , Mike Turquette , Thierry Reding , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Hiroshi Doyu , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org On 10/15/2013 08:52 AM, Peter De Schrijver wrote: > This patch makes periph_clk_enb_refcnt a global array, dynamically allocated > at boottime. It simplifies the macros somewhat and allows clocks common to > several Tegra SoCs to be defined in a separate files. Also the clks array > becomes global and dynamically allocated which allows the DT registration to > be moved to a generic funcion. > diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c > +struct clk ** __init tegra_clk_init(int num, int banks) > { > + if (banks > ARRAY_SIZE(periph_regs)) { > + WARN_ON(1); I think that can just be: if (WARN_ON(banks > ARRAY_SIZE(periph_regs))) { -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html