From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: Re: [PATCH v4 01/11] clk: sunxi: Add display and TCON0 clocks driver Date: Thu, 12 May 2016 08:59:43 +0200 Message-ID: <20160512065943.GX3733@lukather> References: <1461590572-4027-1-git-send-email-maxime.ripard@free-electrons.com> <1461590572-4027-2-git-send-email-maxime.ripard@free-electrons.com> <20160506223002.GE3492@codeaurora.org> <20160508200308.GF6167@lukather> <20160509223238.GW3492@codeaurora.org> <20160509223924.GX3492@codeaurora.org> <1462907459.9981.0.camel@plaes.org> <20160511221541.GG3492@codeaurora.org> <1463024360.16747.4.camel@plaes.org> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5T9d2Bf7JajBsgKp" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <1463024360.16747.4.camel-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Priit Laes Cc: Stephen Boyd , Mike Turquette , David Airlie , Chen-Yu Tsai , Rob Herring , Daniel Vetter , Hans de Goede , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Boris Brezillon , Thomas Petazzoni , Alexander Kaplan , Laurent Pinchart List-Id: devicetree@vger.kernel.org --5T9d2Bf7JajBsgKp Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 12, 2016 at 06:39:20AM +0300, Priit Laes wrote: > On Wed, 2016-05-11 at 15:15 -0700, Stephen Boyd wrote: > > On 05/10, Priit Laes wrote: > > >=20 > > > On Mon, 2016-05-09 at 15:39 -0700, Stephen Boyd wrote: > > > >=20 > > > > On 05/09, Stephen Boyd wrote: > > > > >=20 > > > > >=20 > > > > >=20 > > > > > Ok I applied this one to clk-next. > > > > >=20 > > > > And I squashed this in to silence the following checker warning. > > > >=20 > > > > drivers/clk/sunxi/clk-sun4i-display.c:110:33: warning: Variable > > > > length array is used. > > > >=20 > > > > ---8<--- > > > > diff --git a/drivers/clk/sunxi/clk-sun4i-display.c > > > > b/drivers/clk/sunxi/clk-sun4i-display.c > > > > index f02e250e64ed..f8ff6c4a5633 100644 > > > > --- a/drivers/clk/sunxi/clk-sun4i-display.c > > > > +++ b/drivers/clk/sunxi/clk-sun4i-display.c > > > > @@ -107,7 +107,7 @@ static int > > > > sun4i_a10_display_reset_xlate(struct > > > > reset_controller_dev *rcdev, > > > > =C2=A0static void __init sun4i_a10_display_init(struct device_node > > > > *node, > > > > =C2=A0 =C2=A0=C2=A0const struct > > > > sun4i_a10_display_clk_data *data) > > > > =C2=A0{ > > > > - const char *parents[data->parents]; > > > > + const char *parents[4]; > > > This change breaks at least de_[bf]e clocks which have 3 clock > > > parents. >=20 > > I just used the largest data->parents number, which was 4. How > > does that break anything? >=20 > If you look at the=C2=A0sun4i_a10_display_init, it contains this block: >=20 > =C2=A0 =C2=A0 ret =3D of_clk_parent_fill(node, parents, ARRAY_SIZE(parent= s)); > =C2=A0=C2=A0=C2=A0=C2=A0if (ret !=3D ARRAY_SIZE(parents)) { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pr_err("%s: Could not ret= rieve the parents\n", clk_name); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto unmap; > =C2=A0=C2=A0=C2=A0=C2=A0} >=20 > of_clk_parent_fill returns 3 for de_be/de_fe nodes, and > ARRAY_SIZE(parents) is 4. Replacing both ARRAY_SIZE(parents) by data->parents would work though. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --=20 You received this message because you are subscribed to the Google Groups "= linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. --5T9d2Bf7JajBsgKp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXNCnfAAoJEBx+YmzsjxAgnjIP/RtQp6ZsO9cOdO0iG6mhAFsg 7ba3kAr6Y93EKyVa3lUGwmvf+z0O+Q6QcZateNCbYCWAl6Z3aHgfF6dMJzB+Y6Wd 9zImOiG8O9deMOFO4I6Si9DCag2e99R3FcGcEcmoeX/ty8J0i8zxNrZaJlW/2LWf uJcxtuSvGN9mghZFnHQ+DcKiy8murqw3JB0iY5QxFnLY7MUB9GgVpSe7HT1St004 VsFrsYfmgiIwOWefxLnUgiS4pBiYRjsmxNR0ApBxeqEcjE7tsRZW+nv0U/mlhbq8 aUCMz7b4qf+jfLFpc6MGP4TgGluNCzXCXMsHZa9eOQXsVjwy1gpxo27bsp0wpWvH 08lTNUOkOGseh4dK53EOT8dKJ3n+GrnpZvag/RXUC/ZrwfnShkVHQEtcsd6dcqBK tgHSWs/ZviIkRY2xyUXUtceUQC/PDgrUTtQH4ECu651Qv9ufXpLq94AF1WD2eNq9 KUNliJ67GRhL970s1gAidI1NBDG8ZQe0b/nysZ62yVV+7q8lC6FwvhS2Cdvl0d7u u9t2+xfWBJ/gdrrvTm1GCL18i44z8iQaerkvTiK+nmiBrGK0R55sMpcvMtxfph4x lRmbX7Vb9x1+K5qLfOEF50EugozoDa2YDmll2qbEJ+95QVy5lgl4DcRufHidsfjC OF69rLpAz0u/DPNr01XK =Zvlj -----END PGP SIGNATURE----- --5T9d2Bf7JajBsgKp--