Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1692496
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/7] perf: x86: intel: uncore: constify attribute_group structures. |
| Date | 2017-07-20 09:30 +0200 |
| Message-ID | <u5e4i-41p-27@gated-at.bofh.it> (permalink) |
| References | <u5e4i-41p-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by 'uncore.h' work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
9361 216 88 9665 25c1 arch/x86/events/intel/uncore.o
File size After adding 'const':
text data bss dec hex filename
9393 184 88 9665 25c1 arch/x86/events/intel/uncore.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
arch/x86/events/intel/uncore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 44ec523..1c5390f 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -721,7 +721,7 @@ static ssize_t uncore_get_attr_cpumask(struct device *dev,
NULL,
};
-static struct attribute_group uncore_pmu_attr_group = {
+static const struct attribute_group uncore_pmu_attr_group = {
.attrs = uncore_pmu_attrs,
};
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/7] perf: x86: intel: uncore: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-20 09:30 +0200
csiph-web