Skip to content

Commit a5f4ca6

Browse files
James-A-Clarkwilldeacon
authored andcommitted
perf/arm_dmc620: Remove duplicate format attribute #defines
These were copied from the SPE driver, but now they're in the arm_pmu.h header so delete them and use the header instead. Signed-off-by: James Clark <james.clark@arm.com> Link: https://lore.kernel.org/r/20231211161331.1277825-8-james.clark@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent f6da869 commit a5f4ca6

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

drivers/perf/arm_dmc620_pmu.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/module.h>
2424
#include <linux/mutex.h>
2525
#include <linux/perf_event.h>
26+
#include <linux/perf/arm_pmu.h>
2627
#include <linux/platform_device.h>
2728
#include <linux/printk.h>
2829
#include <linux/rculist.h>
@@ -189,27 +190,6 @@ static const struct attribute_group dmc620_pmu_events_attr_group = {
189190
#define ATTR_CFG_FLD_clkdiv2_LO 9
190191
#define ATTR_CFG_FLD_clkdiv2_HI 9
191192

192-
#define __GEN_PMU_FORMAT_ATTR(cfg, lo, hi) \
193-
(lo) == (hi) ? #cfg ":" #lo "\n" : #cfg ":" #lo "-" #hi
194-
195-
#define _GEN_PMU_FORMAT_ATTR(cfg, lo, hi) \
196-
__GEN_PMU_FORMAT_ATTR(cfg, lo, hi)
197-
198-
#define GEN_PMU_FORMAT_ATTR(name) \
199-
PMU_FORMAT_ATTR(name, \
200-
_GEN_PMU_FORMAT_ATTR(ATTR_CFG_FLD_##name##_CFG, \
201-
ATTR_CFG_FLD_##name##_LO, \
202-
ATTR_CFG_FLD_##name##_HI))
203-
204-
#define _ATTR_CFG_GET_FLD(attr, cfg, lo, hi) \
205-
((((attr)->cfg) >> lo) & GENMASK_ULL(hi - lo, 0))
206-
207-
#define ATTR_CFG_GET_FLD(attr, name) \
208-
_ATTR_CFG_GET_FLD(attr, \
209-
ATTR_CFG_FLD_##name##_CFG, \
210-
ATTR_CFG_FLD_##name##_LO, \
211-
ATTR_CFG_FLD_##name##_HI)
212-
213193
GEN_PMU_FORMAT_ATTR(mask);
214194
GEN_PMU_FORMAT_ATTR(match);
215195
GEN_PMU_FORMAT_ATTR(invert);

0 commit comments

Comments
 (0)