arm64: perf_event: Remove wrongfully used inline
Subsystems (3)
PATCH 1/1 arm64: perf_event: Remove wrongfully used inline
The functions armv8pmu_read_counter() and armv8pmu_write_counter() are static inline while they are only referenced when assigned to a function pointer field in a struct arm_pmu instance.
The inline keyword is thus counter intuitive and shouldn't be used.
--- arch/arm64/kernel/perf_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/perf_event.c +2 -2
@@ -431,7 +431,7 @@ static inline u64 armv8pmu_read_hw_counter(struct perf_event *event)return val; } -static inline u64 armv8pmu_read_counter (struct perf_event *event) +static u64 armv8pmu_read_counter (struct perf_event *event) {struct arm_pmu *cpu_pmu =to_arm_pmu (event->pmu);struct hw_perf_event *hwc = &event->hw;
@@ -468,7 +468,7 @@ static inline void armv8pmu_write_hw_counter(struct perf_event *event, } } -static inline void armv8pmu_write_counter (struct perf_event *event,u64 value) +static void armv8pmu_write_counter (struct perf_event *event,u64 value) {struct arm_pmu *cpu_pmu =to_arm_pmu (event->pmu);struct hw_perf_event *hwc = &event->hw;
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Raphael Gault
The functions
armv8pmu_read_counter()andarmv8pmu_write_counter()arestatic inlinewhile they are only referenced when assigned to a function pointer field in astruct arm_pmuinstance.The inline keyword is thus counter intuitive and shouldn't be used.
Signed-off-by Raphael Gault <[email protected]>
This looks like a sensible cleanup, so:
Will, I assume you'll pick this up.
Thanks,
Mark.
Quoted 29 lines
--- arch/arm64/kernel/perf_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/kernel/perf_event.c +2
-2@@ -431,7 +431,7 @@ static inline u64 armv8pmu_read_hw_counter(struct perf_event *event)return val; } -static inline u64 armv8pmu_read_counter (struct perf_event *event) +static u64 armv8pmu_read_counter (struct perf_event *event) {struct arm_pmu *cpu_pmu =to_arm_pmu (event->pmu);struct hw_perf_event *hwc = &event->hw;@@ -468,7 +468,7 @@ static inline void armv8pmu_write_hw_counter(struct perf_event *event, } } -static inline void armv8pmu_write_counter (struct perf_event *event,u64 value) +static void armv8pmu_write_counter (struct perf_event *event,u64 value) {struct arm_pmu *cpu_pmu =to_arm_pmu (event->pmu);struct hw_perf_event *hwc = &event->hw;Signature · 1 line
2.17.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel