Skip to content

Commit

Permalink
drm/i915/pmu: rearrange hrtimer pointer chasing
Browse files Browse the repository at this point in the history
Do the logical step of first getting from struct hrtimer to struct
i915_pmu, and then from struct i915_pmu to struct drm_i915_private,
instead of hrtimer->i915->pmu.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231023150256.438331-3-jani.nikula@intel.com
  • Loading branch information
Jani Nikula committed Oct 30, 2023
1 parent cb476dd commit 76310ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/i915/i915_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,8 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns)

static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)
{
struct drm_i915_private *i915 =
container_of(hrtimer, struct drm_i915_private, pmu.timer);
struct i915_pmu *pmu = &i915->pmu;
struct i915_pmu *pmu = container_of(hrtimer, struct i915_pmu, timer);
struct drm_i915_private *i915 = pmu_to_i915(pmu);
unsigned int period_ns;
struct intel_gt *gt;
unsigned int i;
Expand Down

0 comments on commit 76310ed

Please sign in to comment.