From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH 03/12] drm/msm/dsi: Add DSI PLL for 28nm 8960 PHY Date: Fri, 16 Oct 2015 11:28:21 -0700 Message-ID: <20151016182821.GC23912@codeaurora.org> References: <1444827544-25656-1-git-send-email-architt@codeaurora.org> <1444827544-25656-4-git-send-email-architt@codeaurora.org> <20151014203520.GA4558@codeaurora.org> <5620F6D9.6050305@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:45174 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754261AbbJPS2Y (ORCPT ); Fri, 16 Oct 2015 14:28:24 -0400 Content-Disposition: inline In-Reply-To: <5620F6D9.6050305@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Archit Taneja Cc: dri-devel@lists.freedesktop.org, robdclark@gmail.com, hali@codeaurora.org, linux-arm-msm@vger.kernel.org On 10/16, Archit Taneja wrote: > > > On 10/15/2015 02:05 AM, Stephen Boyd wrote: > >On 10/14, Archit Taneja wrote: > >>+ bytediv->hw.init = &bytediv_init; > >>+ bytediv->reg = pll_28nm->mmio + REG_DSI_28nm_8960_PHY_PLL_CTRL_9; > >>+ > >>+ snprintf(parent, 32, "dsi%dvco_clk", pll_28nm->id); > >>+ snprintf(clk_name, 32, "dsi%dpllbyte", pll_28nm->id); > >>+ > >>+ bytediv_init.name = clk_name; > >>+ bytediv_init.ops = &clk_bytediv_ops; > >>+ bytediv_init.flags = CLK_SET_RATE_PARENT; > >>+ bytediv_init.parent_names = (const char *[]) { parent }; > > > >Can't we just do &parent instead of this anonymous array? > > &parent doesn't make sense here. parent in this function is an array > of characters, not a pointer to a character. > > I can think of only this way. We do something similar when we call > clk_register_mux() in dsi_pll_28nm.c. > Oh I missed that. Why not allocate the strings instead of putting them on the stack? -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project