Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1043545AbdDVC6n (ORCPT ); Fri, 21 Apr 2017 22:58:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50628 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1043425AbdDVC6k (ORCPT ); Fri, 21 Apr 2017 22:58:40 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7B3E9611C3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Fri, 21 Apr 2017 19:58:37 -0700 From: Stephen Boyd To: Dong Aisheng Cc: Dong Aisheng , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, broonie@kernel.org, yibin.gong@nxp.com, rjw@rjwysocki.net, viresh.kumar@linaro.org, mturquette@baylibre.com, shawnguo@kernel.org, fabio.estevam@nxp.com, anson.huang@nxp.com, ping.bai@nxp.com, leonard.crestez@nxp.com, octavian.purdila@nxp.com Subject: Re: [RFC PATCH 2/3] clk: add managed version of clk_bulk_get Message-ID: <20170422025837.GU7065@codeaurora.org> References: <1491969809-20154-1-git-send-email-aisheng.dong@nxp.com> <1491969809-20154-3-git-send-email-aisheng.dong@nxp.com> <20170413143727.GE24254@b29396-OptiPlex-7040> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170413143727.GE24254@b29396-OptiPlex-7040> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1212 Lines: 27 On 04/13, Dong Aisheng wrote: > On Wed, Apr 12, 2017 at 12:03:28PM +0800, Dong Aisheng wrote: > > drivers/built-in.o: In function `devm_clk_bulk_get': > >> (.text+0x1930e): undefined reference to `clk_bulk_get' > drivers/built-in.o: In function `devm_clk_bulk_release': > >> clk-devres.c:(.text+0x19370): undefined reference to `clk_bulk_put' > > clk_bulk_get is defined in clkdev.c which depends on CONFIG_CLKDEV_LOOKUP. > However, some platforms like m68k may not select CLKDEV_LOOKUP but > select HAVE_CLK. Thus compiling devm_clk_bulk_get may cause a undefined > reference to 'clk_bulk_get'. > > Since clk_bulk_get is built upon the platform specific clk_get api, > clk_bulk_get can also be used by that platform accordingly. > > Then we probably could move clk_bulk_get into clk-devres.c as well which > is controlled by common CONFIG_HAVE_CLK to benifit all platforms. clk-devres is for devm* things. I'd just make another file for now, clk-bulk.c or something like that. When everyone moves to common clk, we can fold it into clk.c, or not because clk.c is rather large right now. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project