Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470185

Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section

From Tomasz Figa <tomasz.figa@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section
Date 2016-08-25 16:50 +0200
Message-ID <sa48G-2d0-3@gated-at.bofh.it> (permalink)
References (5 earlier) <s9gYi-2wu-25@gated-at.bofh.it> <s9yiu-5HK-7@gated-at.bofh.it> <s9BT4-89D-9@gated-at.bofh.it> <s9UVH-4Gy-9@gated-at.bofh.it> <s9XAd-6uu-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-08-25 16:28 GMT+09:00 Chanwoo Choi <cw00.choi@samsung.com>:
> 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to  init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-22 05:00 +0200
  Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct  samsung_cmu_info to init section Stephen Boyd <sboyd@codeaurora.org> - 2016-08-23 03:00 +0200
    Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info  to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-23 04:40 +0200
      Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info  to init section Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-08-23 12:20 +0200
        Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct  samsung_cmu_info to init section Stephen Boyd <sboyd@codeaurora.org> - 2016-08-24 06:50 +0200
          Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info  to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-24 10:40 +0200
            Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct  samsung_cmu_info to init section Stephen Boyd <sboyd@codeaurora.org> - 2016-08-25 07:00 +0200
              Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info  to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-25 09:50 +0200
                Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct  samsung_cmu_info to init section Tomasz Figa <tomasz.figa@gmail.com> - 2016-08-25 16:50 +0200
  Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info  to init section Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-09-01 23:20 +0200

csiph-web