Skip to content

Commit 64432f0

Browse files
77liuqiwilldeacon
authored andcommitted
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>
1 parent 773510f commit 64432f0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

arch/arm64/kernel/perf_event.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,7 @@ armv8pmu_events_sysfs_show(struct device *dev,
165165
}
166166

167167
#define ARMV8_EVENT_ATTR(name, config) \
168-
(&((struct perf_pmu_events_attr) { \
169-
.attr = __ATTR(name, 0444, armv8pmu_events_sysfs_show, NULL), \
170-
.id = config, \
171-
}).attr.attr)
168+
PMU_EVENT_ATTR_ID(name, armv8pmu_events_sysfs_show, config)
172169

173170
static struct attribute *armv8_pmuv3_event_attrs[] = {
174171
ARMV8_EVENT_ATTR(sw_incr, ARMV8_PMUV3_PERFCTR_SW_INCR),

0 commit comments

Comments
 (0)