Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Qi Liu <liuqi115@huawei.com>
Link: https://lore.kernel.org/r/1623220863-58233-3-git-send-email-liuqi115@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Qi Liu and committed by
Will Deacon
7ac87a8d f8e6d241

+2 -5
+2 -5
drivers/perf/arm_smmuv3_pmu.c
··· 511 511 return sysfs_emit(page, "event=0x%02llx\n", pmu_attr->id); 512 512 } 513 513 514 - #define SMMU_EVENT_ATTR(name, config) \ 515 - (&((struct perf_pmu_events_attr) { \ 516 - .attr = __ATTR(name, 0444, smmu_pmu_event_show, NULL), \ 517 - .id = config, \ 518 - }).attr.attr) 514 + #define SMMU_EVENT_ATTR(name, config) \ 515 + PMU_EVENT_ATTR_ID(name, smmu_pmu_event_show, config) 519 516 520 517 static struct attribute *smmu_pmu_events[] = { 521 518 SMMU_EVENT_ATTR(cycles, 0),