All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <intel-gfx@lists.freedesktop.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	kernel test robot <lkp@intel.com>,
	 Dan Carpenter <dan.carpenter@linaro.org>,
	Vinay Belgaumkar <vinay.belgaumkar@intel.com>,
	John Harrison <John.C.Harrison@Intel.com>
Subject: [PATCH] drm/i915/guc: Remove bogus null check
Date: Thu, 28 Mar 2024 17:31:07 -0400	[thread overview]
Message-ID: <20240328213107.90632-1-rodrigo.vivi@intel.com> (raw)

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.

Fixes: cec82816d0d0 ("drm/i915/guc: Use context hints for GT frequency")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202403101225.7AheJhZJ-lkp@intel.com/
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 01d0ec1b30f2..24a82616f844 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);
-- 
2.44.0


             reply	other threads:[~2024-03-28 21:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 21:31 Rodrigo Vivi [this message]
2024-03-28 21:41 ` [PATCH] drm/i915/guc: Remove bogus null check Andi Shyti
2024-03-29  1:39   ` Rodrigo Vivi
2024-03-29  7:09     ` Andi Shyti
2024-03-29 16:38       ` Dan Carpenter
2024-04-03 18:46         ` Rodrigo Vivi
2024-03-29  6:00 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-03-29  6:14 ` ✓ Fi.CI.BAT: success " Patchwork
2024-03-30  5:35 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240328213107.90632-1-rodrigo.vivi@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=John.C.Harrison@Intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lkp@intel.com \
    --cc=vinay.belgaumkar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.