diff options
author | Qi Liu <[email protected]> | 2021-06-09 14:40:58 +0800 |
---|---|---|
committer | Will Deacon <[email protected]> | 2021-06-11 11:18:40 +0100 |
commit | 7ac87a8dfbd9c42fa1920773b09a57586222aad4 (patch) | |
tree | d25b1cdafe6c9cbd4d6a2bbcbb7d28a66cd30c8c | |
parent | f8e6d24144d1bfbb8714faa9044e135c0c00bd89 (diff) |
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 <[email protected]>
Cc: Mark Rutland <[email protected]>
Signed-off-by: Qi Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
-rw-r--r-- | drivers/perf/arm_smmuv3_pmu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index c195a9adec32..226348822ab3 100644 --- a/drivers/perf/arm_smmuv3_pmu.c +++ b/drivers/perf/arm_smmuv3_pmu.c @@ -511,11 +511,8 @@ static ssize_t smmu_pmu_event_show(struct device *dev, return sysfs_emit(page, "event=0x%02llx\n", pmu_attr->id); } -#define SMMU_EVENT_ATTR(name, config) \ - (&((struct perf_pmu_events_attr) { \ - .attr = __ATTR(name, 0444, smmu_pmu_event_show, NULL), \ - .id = config, \ - }).attr.attr) +#define SMMU_EVENT_ATTR(name, config) \ + PMU_EVENT_ATTR_ID(name, smmu_pmu_event_show, config) static struct attribute *smmu_pmu_events[] = { SMMU_EVENT_ATTR(cycles, 0), |