Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934356AbdGTHXO (ORCPT ); Thu, 20 Jul 2017 03:23:14 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38162 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934312AbdGTHWp (ORCPT ); Thu, 20 Jul 2017 03:22:45 -0400 From: Arvind Yadav To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, bp@alien8.de, tony.luck@intel.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH 6/7] x86: therm_throt: constify attribute_group structures. Date: Thu, 20 Jul 2017 12:51:44 +0530 Message-Id: <1500535305-9369-7-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500535305-9369-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500535305-9369-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1128 Lines: 32 attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 3586 864 32 4482 1182 x86/kernel/cpu/mcheck/therm_throt.o File size After adding 'const': text data bss dec hex filename 3550 928 32 4482 1182 x86/kernel/cpu/mcheck/therm_throt.o Signed-off-by: Arvind Yadav --- arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index d7cc190..f7370ab 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -122,7 +122,7 @@ struct thermal_state { NULL }; -static struct attribute_group thermal_attr_group = { +static const struct attribute_group thermal_attr_group = { .attrs = thermal_throttle_attrs, .name = "thermal_throttle" }; -- 1.9.1