Skip to content

Commit

Permalink
perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Zubin Mithra authored and Ingo Molnar committed Sep 12, 2018
1 parent cbdd96f commit 49e7324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/events/intel/pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};

Expand Down

0 comments on commit 49e7324

Please sign in to comment.