From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757363AbcHYOn3 (ORCPT ); Thu, 25 Aug 2016 10:43:29 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:34961 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756732AbcHYOnR (ORCPT ); Thu, 25 Aug 2016 10:43:17 -0400 MIME-Version: 1.0 In-Reply-To: <57BE9E16.7090309@samsung.com> References: <1471834185-20249-1-git-send-email-cw00.choi@samsung.com> <1471834185-20249-2-git-send-email-cw00.choi@samsung.com> <20160823005512.GP6502@codeaurora.org> <57BBB66E.2060807@samsung.com> <84e40b9b-1e08-24e0-f1ef-60b38b760ae6@samsung.com> <20160824044346.GR6502@codeaurora.org> <57BD5CFB.5050500@samsung.com> <20160825001109.GO19826@codeaurora.org> <57BE9E16.7090309@samsung.com> From: Tomasz Figa Date: Thu, 25 Aug 2016 23:43:10 +0900 Message-ID: Subject: Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section To: Chanwoo Choi Cc: Stephen Boyd , Sylwester Nawrocki , Michael Turquette , Kukjin Kim , =?UTF-8?Q?Krzysztof_Koz=C5=82owski?= , chanwoo@kernel.org, "linux-samsung-soc@vger.kernel.org" , linux-clk@vger.kernel.org, linux-arm-kernel , linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u7PEhlFS004954 2016-08-25 16:28 GMT+09:00 Chanwoo Choi : > Hi Stephen, > > On 2016년 08월 25일 09:11, Stephen Boyd wrote: >> On 08/24, Chanwoo Choi wrote: >>> On 2016년 08월 24일 13:43, Stephen Boyd wrote: >>>> On 08/23, Sylwester Nawrocki wrote: >>>>> So the saving is rather insignificant but the patch doesn't make >>>>> things worse and I'd say it might be worth applying. >>>>> >>>> >>>> Sounds good. This sort of information should be in the commit >>>> text though. Talking about const doesn't make any sense to me. >>> >>> Do you mean that 'const' is initconst secion? >> >> No. Marking it as initconst in the patch is correct. > > OK. > >> >>> If possible, could you explain the anything >>> why you don't make sense about 'const'? >>> >> >> I'm just saying that the reasoning to move it from the text >> section to the data section shouldn't be because of const. There >> should be better reasons to do this, like size benefits. >> > > As I already said, the samsung_cmu_register_on() requires > the 'const' type argument for 'struct samsung_cmu_info'. If a function takes a const pointer as an argument, then it's perfectly valid to give a non-const pointer. Casting from non-cost into const is valid, other way around not. > > So, I defined the instance on the out of the exynos5260_clk_aud_init() as following: > static const struct samsung_cmu_info aud_cmu __initconst = { > > How can i add the 'const' keyword and '__initsecion' to the > "struct samsung_cmu_info aud_cmu" in the "static void __init > exynos5260_clk_aud_init(struct device_node *np)"? Stephen meant that there must be some benefit from a change to make it worth being included into the kernel. Best regards, Tomasz