From patchwork Mon May 9 22:39:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9051321 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 010CFBF29F for ; Mon, 9 May 2016 22:39:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2103C2012D for ; Mon, 9 May 2016 22:39:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 049B42012B for ; Mon, 9 May 2016 22:39:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E01B6E430; Mon, 9 May 2016 22:39:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id E59CE6E430 for ; Mon, 9 May 2016 22:39:25 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D1D9A6131F; Mon, 9 May 2016 22:39:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 38564601B5; Mon, 9 May 2016 22:39:25 +0000 (UTC) Date: Mon, 9 May 2016 15:39:24 -0700 From: Stephen Boyd To: Maxime Ripard Subject: Re: [PATCH v4 01/11] clk: sunxi: Add display and TCON0 clocks driver Message-ID: <20160509223924.GX3492@codeaurora.org> 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160509223238.GW3492@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Thomas Petazzoni , devicetree@vger.kernel.org, Mike Turquette , linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans de Goede , Chen-Yu Tsai , Rob Herring , Laurent Pinchart , Alexander Kaplan , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 05/09, Stephen Boyd wrote: > > Ok I applied this one to clk-next. > And I squashed this in to silence the following checker warning. drivers/clk/sunxi/clk-sun4i-display.c:110:33: warning: Variable length array is used. ---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, static void __init sun4i_a10_display_init(struct device_node *node, const struct sun4i_a10_display_clk_data *data) { - const char *parents[data->parents]; + const char *parents[4]; const char *clk_name = node->name; struct reset_data *reset_data; struct clk_divider *div = NULL; @@ -126,8 +126,8 @@ static void __init sun4i_a10_display_init(struct device_node *node, return; } - ret = of_clk_parent_fill(node, parents, data->parents); - if (ret != data->parents) { + ret = of_clk_parent_fill(node, parents, ARRAY_SIZE(parents)); + if (ret != ARRAY_SIZE(parents)) { pr_err("%s: Could not retrieve the parents\n", clk_name); goto unmap; }