Commit 93dff100 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Remove pointer indirection for hangcheck_state local

Use the local on-stack struct directly rather than hide it behind a
pointer. This should be both clearer for the reader and the compiler (we
rely on the compiler seeing through the functions to spot uninitialized
uses of the local).
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171219130948.6282-1-chris@chris-wilson.co.uk
parent 398c8a30
...@@ -429,18 +429,18 @@ static void i915_hangcheck_elapsed(struct work_struct *work) ...@@ -429,18 +429,18 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
intel_uncore_arm_unclaimed_mmio_detection(dev_priv); intel_uncore_arm_unclaimed_mmio_detection(dev_priv);
for_each_engine(engine, dev_priv, id) { for_each_engine(engine, dev_priv, id) {
struct intel_engine_hangcheck cur_state, *hc = &cur_state;
const bool busy = intel_engine_has_waiter(engine); const bool busy = intel_engine_has_waiter(engine);
struct intel_engine_hangcheck hc;
semaphore_clear_deadlocks(dev_priv); semaphore_clear_deadlocks(dev_priv);
hangcheck_load_sample(engine, hc); hangcheck_load_sample(engine, &hc);
hangcheck_accumulate_sample(engine, hc); hangcheck_accumulate_sample(engine, &hc);
hangcheck_store_sample(engine, hc); hangcheck_store_sample(engine, &hc);
if (engine->hangcheck.stalled) { if (engine->hangcheck.stalled) {
hung |= intel_engine_flag(engine); hung |= intel_engine_flag(engine);
if (hc->action != ENGINE_DEAD) if (hc.action != ENGINE_DEAD)
stuck |= intel_engine_flag(engine); stuck |= intel_engine_flag(engine);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment