summaryrefslogtreecommitdiff
path: root/drivers/perf/qcom_l3_pmu.c
diff options
context:
space:
mode:
authorQi Liu <liuqi115@huawei.com>2021-06-09 09:41:00 +0300
committerWill Deacon <will@kernel.org>2021-06-11 13:18:40 +0300
commit78b1d3c72070bbc9793e63dd6528c1e67ee0d52a (patch)
tree96975ff436d941d9e757b2a6172b894b301d5ad0 /drivers/perf/qcom_l3_pmu.c
parent0bf2d7298842afbc28a5413024ebc444a599e980 (diff)
downloadlinux-78b1d3c72070bbc9793e63dd6528c1e67ee0d52a.tar.xz
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: Qi Liu <liuqi115@huawei.com> Link: https://lore.kernel.org/r/1623220863-58233-5-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/qcom_l3_pmu.c')
-rw-r--r--drivers/perf/qcom_l3_pmu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/perf/qcom_l3_pmu.c b/drivers/perf/qcom_l3_pmu.c
index c76f6f21d2a8..1ff2ff6582bf 100644
--- a/drivers/perf/qcom_l3_pmu.c
+++ b/drivers/perf/qcom_l3_pmu.c
@@ -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),