diff mbox series

drm/i915/pmu: Remove i915_pmu_event_event_idx()

Message ID 20250113183329.3138138-1-lucas.demarchi@intel.com (mailing list archive)
State New
Headers show
Series drm/i915/pmu: Remove i915_pmu_event_event_idx() | expand

Commit Message

Lucas De Marchi Jan. 13, 2025, 6:33 p.m. UTC
perf event already has a default function that returns 0, no need to
override with the same thing.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Dixit, Ashutosh Jan. 13, 2025, 6:42 p.m. UTC | #1
On Mon, 13 Jan 2025 10:33:29 -0800, Lucas De Marchi wrote:
>
> perf event already has a default function that returns 0, no need to
> override with the same thing.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_pmu.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index e55db036be1bb..2eecd42f61ba1 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -891,11 +891,6 @@ static void i915_pmu_event_del(struct perf_event *event, int flags)
>	i915_pmu_event_stop(event, PERF_EF_UPDATE);
>  }
>
> -static int i915_pmu_event_event_idx(struct perf_event *event)
> -{
> -	return 0;
> -}
> -
>  struct i915_str_attribute {
>	struct device_attribute attr;
>	const char *str;
> @@ -1301,7 +1296,6 @@ void i915_pmu_register(struct drm_i915_private *i915)
>	pmu->base.start		= i915_pmu_event_start;
>	pmu->base.stop		= i915_pmu_event_stop;
>	pmu->base.read		= i915_pmu_event_read;
> -	pmu->base.event_idx	= i915_pmu_event_event_idx;
>
>	ret = perf_pmu_register(&pmu->base, pmu->name, -1);
>	if (ret)
> --
> 2.48.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index e55db036be1bb..2eecd42f61ba1 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -891,11 +891,6 @@  static void i915_pmu_event_del(struct perf_event *event, int flags)
 	i915_pmu_event_stop(event, PERF_EF_UPDATE);
 }
 
-static int i915_pmu_event_event_idx(struct perf_event *event)
-{
-	return 0;
-}
-
 struct i915_str_attribute {
 	struct device_attribute attr;
 	const char *str;
@@ -1301,7 +1296,6 @@  void i915_pmu_register(struct drm_i915_private *i915)
 	pmu->base.start		= i915_pmu_event_start;
 	pmu->base.stop		= i915_pmu_event_stop;
 	pmu->base.read		= i915_pmu_event_read;
-	pmu->base.event_idx	= i915_pmu_event_event_idx;
 
 	ret = perf_pmu_register(&pmu->base, pmu->name, -1);
 	if (ret)