Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1734821 > unrolled thread
| Started by | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| First post | 2017-09-19 13:20 +0200 |
| Last post | 2017-09-19 13:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] x86/events/amd/iommu: make iommu_pmu const and __initconst Bhumika Goyal <bhumirks@gmail.com> - 2017-09-19 13:20 +0200
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-09-19 13:20 +0200 |
| Subject | [PATCH] x86/events/amd/iommu: make iommu_pmu const and __initconst |
| Message-ID | <uroJj-4LH-1@gated-at.bofh.it> |
Make this const as it is only used during a copy operation. Also, make
it __initconst as it is only used during the init phase and after this
it is not referenced anywhere.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
arch/x86/events/amd/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c
index 3641e24..38b5d41 100644
--- a/arch/x86/events/amd/iommu.c
+++ b/arch/x86/events/amd/iommu.c
@@ -405,7 +405,7 @@ static __init int _init_events_attrs(void)
NULL,
};
-static struct pmu iommu_pmu = {
+static const struct pmu iommu_pmu __initconst = {
.event_init = perf_iommu_event_init,
.add = perf_iommu_add,
.del = perf_iommu_del,
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web