perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init
authorZubin Mithra <zsm@chromium.org>
Wed, 12 Sep 2018 16:45:10 +0000 (09:45 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 Sep 2018 19:16:16 +0000 (21:16 +0200)
'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>
arch/x86/events/intel/pt.c

index 8d016ce5b80dcc0ab1102c0e864bb706297d6de4..3a0aa83cbd0744ce0193f55b1b73178614280c7a 100644 (file)
@@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev,
        return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap));
 }
 
-static struct attribute_group pt_cap_group = {
+static struct attribute_group pt_cap_group __ro_after_init = {
        .name   = "caps",
 };