projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ac87a8
)
drivers/perf: Simplify EVENT ATTR macro in qcom_l2_pmu.c
author
Qi Liu
<liuqi115@huawei.com>
Wed, 9 Jun 2021 06:40:59 +0000
(14:40 +0800)
committer
Will Deacon
<will@kernel.org>
Fri, 11 Jun 2021 10:18:40 +0000
(11:18 +0100)
Use common macro PMU_EVENT_ATTR_ID to simplify L2CACHE_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-4-git-send-email-liuqi115@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/qcom_l2_pmu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/perf/qcom_l2_pmu.c
b/drivers/perf/qcom_l2_pmu.c
index b60e30141583eabc86d0ee1c41800fc87a2f32bf..5b093badd0f65522739ef544f30b94d25e9c5456 100644
(file)
--- a/
drivers/perf/qcom_l2_pmu.c
+++ b/
drivers/perf/qcom_l2_pmu.c
@@
-679,11
+679,8
@@
static ssize_t l2cache_pmu_event_show(struct device *dev,
return sysfs_emit(page, "event=0x%02llx\n", pmu_attr->id);
}
-#define L2CACHE_EVENT_ATTR(_name, _id) \
- (&((struct perf_pmu_events_attr[]) { \
- { .attr = __ATTR(_name, 0444, l2cache_pmu_event_show, NULL), \
- .id = _id, } \
- })[0].attr.attr)
+#define L2CACHE_EVENT_ATTR(_name, _id) \
+ PMU_EVENT_ATTR_ID(_name, l2cache_pmu_event_show, _id)
static struct attribute *l2_cache_pmu_events[] = {
L2CACHE_EVENT_ATTR(cycles, L2_EVENT_CYCLES),