* [PATCH] arm64: perf_event: Remove wrongfully used inline
@ 2019-04-11 16:16 Raphael Gault
2019-04-11 16:21 ` Mark Rutland
0 siblings, 1 reply; 2+ messages in thread
From: Raphael Gault @ 2019-04-11 16:16 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: mark.rutland, Raphael Gault, will.deacon
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.
Signed-off-by: Raphael Gault <raphael.gault@arm.com>
---
arch/arm64/kernel/perf_event.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index 4addb38bc250..6164d389eed6 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -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;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: perf_event: Remove wrongfully used inline
2019-04-11 16:16 [PATCH] arm64: perf_event: Remove wrongfully used inline Raphael Gault
@ 2019-04-11 16:21 ` Mark Rutland
0 siblings, 0 replies; 2+ messages in thread
From: Mark Rutland @ 2019-04-11 16:21 UTC (permalink / raw)
To: Raphael Gault; +Cc: will.deacon, linux-arm-kernel
On Thu, Apr 11, 2019 at 05:16:46PM +0100, Raphael Gault wrote:
> 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.
>
> Signed-off-by: Raphael Gault <raphael.gault@arm.com>
This looks like a sensible cleanup, so:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Will, I assume you'll pick this up.
Thanks,
Mark.
> ---
> arch/arm64/kernel/perf_event.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
> index 4addb38bc250..6164d389eed6 100644
> --- a/arch/arm64/kernel/perf_event.c
> +++ b/arch/arm64/kernel/perf_event.c
> @@ -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;
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-11 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-11 16:16 [PATCH] arm64: perf_event: Remove wrongfully used inline Raphael Gault
2019-04-11 16:21 ` Mark Rutland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox