Skip to content

Commit 49e7324

Browse files
Zubin Mithraingomolnar
authored andcommitted
perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init
'pt_cap_group' is written to in pt_pmu_hw_init() and not modified after. This makes it a suitable candidate for annotating as __ro_after_init. Signed-off-by: Zubin Mithra <zsm@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20180912164510.23444-1-zsm@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent cbdd96f commit 49e7324

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • arch/x86/events/intel

‎arch/x86/events/intel/pt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev,
9595
return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap));
9696
}
9797

98-
static struct attribute_group pt_cap_group = {
98+
static struct attribute_group pt_cap_group __ro_after_init = {
9999
.name = "caps",
100100
};
101101

0 commit comments

Comments
 (0)