Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965342AbdGTLbj (ORCPT ); Thu, 20 Jul 2017 07:31:39 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38460 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936035AbdGTLbh (ORCPT ); Thu, 20 Jul 2017 07:31:37 -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 v2 6/7] x86: therm_throt: constify attribute_group structures. Date: Thu, 20 Jul 2017 17:00:37 +0530 Message-Id: <1500550238-15655-7-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500550238-15655-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500550238-15655-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: 911 Lines: 27 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. Signed-off-by: Arvind Yadav --- change in v2: Remove before/after size comparison from commit message. 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