Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754789AbaAVDGU (ORCPT ); Tue, 21 Jan 2014 22:06:20 -0500 Received: from mail-wg0-f45.google.com ([74.125.82.45]:48007 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753419AbaAVDGS (ORCPT ); Tue, 21 Jan 2014 22:06:18 -0500 MIME-Version: 1.0 In-Reply-To: References: <1390110907-29918-1-git-send-email-sj38.park@gmail.com> <20140119173712.GA26481@kroah.com> From: SeongJae Park Date: Wed, 22 Jan 2014 12:05:57 +0900 Message-ID: Subject: Re: [PATCH] clk: export __clk_get_hw for re-use in others To: Mike Turquette Cc: Greg KH , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Greg, Mike, May I ask your answer or other opinion, please? On Mon, Jan 20, 2014 at 5:07 PM, SeongJae Park wrote: > On Mon, Jan 20, 2014 at 4:47 PM, Mike Turquette wrote: >> On Sun, Jan 19, 2014 at 9:37 AM, Greg KH wrote: >>> On Sun, Jan 19, 2014 at 02:55:07PM +0900, SeongJae Park wrote: >>>> Following build comes while modprobe process: >>>> > ERROR: "__clk_get_hw" [drivers/clk/clk-max77686.ko] undefined! >>>> > make[2]: *** [__modpost] Error 1 >>>> > make[1]: *** [modules] Error 2 >>>> >>>> Export the symbol to fix it and for other part's usecase. >>>> >>>> Signed-off-by: SeongJae Park >>>> --- >>>> drivers/clk/clk.c | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c >>>> index 2b38dc9..3883fba 100644 >>>> --- a/drivers/clk/clk.c >>>> +++ b/drivers/clk/clk.c >>>> @@ -575,6 +575,7 @@ struct clk_hw *__clk_get_hw(struct clk *clk) >>>> { >>>> return !clk ? NULL : clk->hw; >>>> } >>>> +EXPORT_SYMBOL_GPL(__clk_get_hw); >>> >>> __ functions should usually only be for "internal" use, why does this >>> get exported to modules? Why not just put it in a .h file? >> >> It was originally used only within the clock core but it is sensible >> for hardware-specific clock drivers to use this as well. I plan to >> audit all of the double-underscore functions in >> include/linux/clk-provider.h for 3.15. >> >> Regards, >> Mike >> > Thank you very much for answering about it, Mike. > > I agree Greg's indication and think Mike's explanation is reasonable. > > So, I think it would be better to just export the symbol now > because it would be easier for future functions renaming and > similar issues were solved in this way in past: > https://lkml.org/lkml/2013/4/15/50 > > Or, maybe I can change the client code of __clk_get_hw to not use the function. > > What do you think would be better to fix this build error? Or, do you > have better idea? > I will respect your opinion. > > Thanks and Regards. > SeongJae Park. > >>> >>> greg k-h -- 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/