From: Rodrigo Vivi Date: Thu, 28 Mar 2024 21:31:07 +0000 (-0400) Subject: drm/i915/guc: Remove bogus null check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=74065388607f78fdeca4cd20ac331eefcdefc5ea;p=linux.git drm/i915/guc: Remove bogus null check This null check is bogus because we are already using 'ce' stuff in many places before this function is called. Having this here is useless and confuses static analyzer tools that can see: struct intel_engine_cs *engine = ce->engine; before this check, in the same function. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202403101225.7AheJhZJ-lkp@intel.com/ Cc: Vinay Belgaumkar Cc: John Harrison Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240328213107.90632-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 01d0ec1b30f2b..24a82616f8446 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -2677,7 +2677,7 @@ static int guc_context_policy_init_v70(struct intel_context *ce, bool loop) execution_quantum = engine->props.timeslice_duration_ms * 1000; preemption_timeout = engine->props.preempt_timeout_ms * 1000; - if (ce && (ce->flags & BIT(CONTEXT_LOW_LATENCY))) + if (ce->flags & BIT(CONTEXT_LOW_LATENCY)) slpc_ctx_freq_req |= SLPC_CTX_FREQ_REQ_IS_COMPUTE; __guc_context_policy_start_klv(&policy, ce->guc_id.id);