[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1500550238-15655-7-git-send-email-arvind.yadav.cs@gmail.com>
Date: Thu, 20 Jul 2017 17:00:37 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, bp@...en8.de, tony.luck@...el.com
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH v2 6/7] x86: therm_throt: constify attribute_group structures.
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
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
Powered by blists - more mailing lists