Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbbEGAzI (ORCPT ); Wed, 6 May 2015 20:55:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48200 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbbEGAzG (ORCPT ); Wed, 6 May 2015 20:55:06 -0400 Message-ID: <554AB7E8.1040009@codeaurora.org> Date: Wed, 06 May 2015 17:55:04 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Murilo Opsfelder Araujo , linux-kernel@vger.kernel.org CC: linux-clk@vger.kernel.org, Mike Turquette Subject: Re: [PATCH 2/2] drivers: clk: clk.c: Make clk_is_orphan() dependent of CONFIG_OF References: <1430959861-14925-1-git-send-email-mopsfelder@gmail.com> <1430959861-14925-3-git-send-email-mopsfelder@gmail.com> In-Reply-To: <1430959861-14925-3-git-send-email-mopsfelder@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1893 Lines: 63 On 05/06/15 17:51, Murilo Opsfelder Araujo wrote: > The function clk_is_orphan() is called only by > __of_clk_get_from_provider(), which depends on CONFIG_OF, so it does > make sense the move. > > This change also gets rid of the following build message when CONFIG_OF > is not set: > > drivers/clk/clk.c:2231:13: warning: ‘clk_is_orphan’ defined but not used [-Wunused-function] > > Signed-off-by: Murilo Opsfelder Araujo The patch that introduces this problem is gone now. > --- > drivers/clk/clk.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index a961eb6..d748aa2 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -2228,14 +2228,6 @@ static inline void clk_debug_unregister(struct clk_core *core) > } > #endif /* CONFIG_DEBUG_FS */ > > -static bool clk_is_orphan(const struct clk *clk) > -{ > - if (!clk) > - return false; > - > - return clk->core->orphan; > -} > - > /** > * __clk_init - initialize the data structures in a struct clk > * @dev: device initializing this clk, placeholder for now > @@ -2950,6 +2942,14 @@ void of_clk_del_provider(struct device_node *np) > } > EXPORT_SYMBOL_GPL(of_clk_del_provider); > > +static bool clk_is_orphan(const struct clk *clk) > +{ > + if (!clk) > + return false; > + > + return clk->core->orphan; > +} > + > struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec, > const char *dev_id, const char *con_id) > { -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/