Skip to content

Commit 71e0cb3

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf/arm_cspmu: Fix event attribute type
ARM_CSPMU_EVENT_ATTR() defines a struct perf_pmu_events_attr, so arm_cspmu_sysfs_event_show() should not be interpreting it as struct dev_ext_attribute. Fixes: e37dfd6 ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver") Reviewed-by: Suzuki K Poulose <[email protected]> Reviewed-and-tested-by: Ilkka Koskinen <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/27c0804af64007b2400abbc40278f642ee6a0a29.1685983270.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
1 parent 225d757 commit 71e0cb3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/perf/arm_cspmu/arm_cspmu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ static inline bool use_64b_counter_reg(const struct arm_cspmu *cspmu)
189189
ssize_t arm_cspmu_sysfs_event_show(struct device *dev,
190190
struct device_attribute *attr, char *buf)
191191
{
192-
struct dev_ext_attribute *eattr =
193-
container_of(attr, struct dev_ext_attribute, attr);
194-
return sysfs_emit(buf, "event=0x%llx\n",
195-
(unsigned long long)eattr->var);
192+
struct perf_pmu_events_attr *pmu_attr;
193+
194+
pmu_attr = container_of(attr, typeof(*pmu_attr), attr);
195+
return sysfs_emit(buf, "event=0x%llx\n", pmu_attr->id);
196196
}
197197
EXPORT_SYMBOL_GPL(arm_cspmu_sysfs_event_show);
198198

0 commit comments

Comments
 (0)