Commit 7ac87a8d authored by Qi Liu's avatar Qi Liu Committed by Will Deacon
Browse files

drivers/perf: Simplify EVENT ATTR macro in SMMU PMU driver



Use common macro PMU_EVENT_ATTR_ID to simplify SMMU_EVENT_ATTR

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-3-git-send-email-liuqi115@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent f8e6d241
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -512,10 +512,7 @@ static ssize_t smmu_pmu_event_show(struct device *dev,
}

#define SMMU_EVENT_ATTR(name, config)			\
	(&((struct perf_pmu_events_attr) {				\
		.attr = __ATTR(name, 0444, smmu_pmu_event_show, NULL),	\
		.id = config,						\
	}).attr.attr)
	PMU_EVENT_ATTR_ID(name, smmu_pmu_event_show, config)

static struct attribute *smmu_pmu_events[] = {
	SMMU_EVENT_ATTR(cycles, 0),