Commit 78b1d3c7 authored by Qi Liu's avatar Qi Liu Committed by Will Deacon
Browse files

drivers/perf: Simplify EVENT ATTR macro in qcom_l3_pmu.c



Use common macro PMU_EVENT_ATTR_ID to simplify L3CACHE_EVENT_ATTR

Cc: Andy Gross <agross@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
Link: https://lore.kernel.org/r/1623220863-58233-5-git-send-email-liuqi115@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 0bf2d729
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -647,10 +647,7 @@ static ssize_t l3cache_pmu_event_show(struct device *dev,
}

#define L3CACHE_EVENT_ATTR(_name, _id)					     \
	(&((struct perf_pmu_events_attr[]) {				     \
		{ .attr = __ATTR(_name, 0444, l3cache_pmu_event_show, NULL), \
		  .id = _id, }						     \
	})[0].attr.attr)
	PMU_EVENT_ATTR_ID(_name, l3cache_pmu_event_show, _id)

static struct attribute *qcom_l3_cache_pmu_events[] = {
	L3CACHE_EVENT_ATTR(cycles, L3_EVENT_CYCLES),