Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1684006 > unrolled thread
| Started by | Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
|---|---|
| First post | 2017-07-10 09:20 +0200 |
| Last post | 2017-07-10 09:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] kernel: cpu: hotplug: constify attribute_group structures. Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-07-10 09:20 +0200
Re: [PATCH] kernel: cpu: hotplug: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-10 09:40 +0200
| From | Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
|---|---|
| Date | 2017-07-10 09:20 +0200 |
| Subject | Re: [PATCH] kernel: cpu: hotplug: constify attribute_group structures. |
| Message-ID | <u1B97-1VK-3@gated-at.bofh.it> |
On 2017-06-29 17:40:47 [+0530], Arvind Yadav wrote: > attribute_groups are not supposed to change at runtime. All functions > working with attribute_groups provided by <linux/sysfs.h> work with const > attribute_group. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 12582 15361 20 27963 6d3b kernel/cpu.o > > File size After adding 'const': > text data bss dec hex filename > 12710 15265 20 27995 6d5b kernel/cpu.o While there does not seem to be anything wrong with it, why did the file grow after the patch was applied? > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Sebastian
[toc] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-07-10 09:40 +0200 |
| Message-ID | <u1Bst-236-1@gated-at.bofh.it> |
| In reply to | #1684006 |
Hi Sebastian,
On Monday 10 July 2017 12:44 PM, Sebastian Andrzej Siewior wrote:
> On 2017-06-29 17:40:47 [+0530], Arvind Yadav wrote:
>> attribute_groups are not supposed to change at runtime. All functions
>> working with attribute_groups provided by <linux/sysfs.h> work with const
>> attribute_group. So mark the non-const structs as const.
>>
>> File size before:
>> text data bss dec hex filename
>> 12582 15361 20 27963 6d3b kernel/cpu.o
>>
>> File size After adding 'const':
>> text data bss dec hex filename
>> 12710 15265 20 27995 6d5b kernel/cpu.o
> While there does not seem to be anything wrong with it, why did the file
> grow after the patch was applied?
Yes, You are right. I have added few more changes for some experiment.
Which is increasing size of file. Sorry for that, Correct comparison
is this.
File size before:
text data bss dec hex filename
12909 15361 20 28290 6e82 kernel/cpu.o
File size After adding 'const':
text data bss dec hex filename
12973 15297 20 28290 6e82 kernel/cpu.o
I will send updated patch.
>> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> Sebastian
Thanks
~arvind
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web