diff options
author | Qi Liu <liuqi115@huawei.com> | 2021-06-09 14:41:03 +0800 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-06-11 11:18:41 +0100 |
commit | 64432f09068a0fa76f20918a3c22ee3484a3762d (patch) | |
tree | 66bdb421fb48684f33e762c0df9639a6d935217a | |
parent | 773510f4d2775bda7cec585e8643f4269c4944e5 (diff) | |
download | lwn-64432f09068a0fa76f20918a3c22ee3484a3762d.tar.gz lwn-64432f09068a0fa76f20918a3c22ee3484a3762d.zip |
arm64: perf: Simplify EVENT ATTR macro in perf_event.c
Use common macro PMU_EVENT_ATTR_ID to simplify ARMV8_EVENT_ATTR
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Qi Liu <liuqi115@huawei.com>
Link: https://lore.kernel.org/r/1623220863-58233-8-git-send-email-liuqi115@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | arch/arm64/kernel/perf_event.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index a661010308c0..d07788dad388 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c @@ -165,10 +165,7 @@ armv8pmu_events_sysfs_show(struct device *dev, } #define ARMV8_EVENT_ATTR(name, config) \ - (&((struct perf_pmu_events_attr) { \ - .attr = __ATTR(name, 0444, armv8pmu_events_sysfs_show, NULL), \ - .id = config, \ - }).attr.attr) + PMU_EVENT_ATTR_ID(name, armv8pmu_events_sysfs_show, config) static struct attribute *armv8_pmuv3_event_attrs[] = { ARMV8_EVENT_ATTR(sw_incr, ARMV8_PMUV3_PERFCTR_SW_INCR), |