From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438AbdGJHaL (ORCPT ); Mon, 10 Jul 2017 03:30:11 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34912 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751045AbdGJHaK (ORCPT ); Mon, 10 Jul 2017 03:30:10 -0400 Subject: Re: [PATCH] kernel: cpu: hotplug: constify attribute_group structures. To: Sebastian Andrzej Siewior References: <20170710071442.pvfbfknsn5hmjqk4@linutronix.de> Cc: tglx@linutronix.de, mingo@kernel.org, anna-maria@linutronix.de, boris.ostrovsky@oracle.com, rcochran@linutronix.de, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org From: Arvind Yadav Message-ID: <76ac9ca0-34cb-21d4-5cd6-9839a0d9a6eb@gmail.com> Date: Mon, 10 Jul 2017 12:59:27 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170710071442.pvfbfknsn5hmjqk4@linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > Sebastian Thanks ~arvind