All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 3/5] drm/i915/dmc: remove unnecessary dmc_id validity check
Date: Thu,  2 Feb 2023 14:04:50 +0200	[thread overview]
Message-ID: <b4e1c862687f79861a5fa4bfa6797ecda2136fab.1675339447.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1675339447.git.jani.nikula@intel.com>

The dmc_id comes from for_each_dmc_id() in parse_dmc_fw() ->
parse_dmc_fw_header() -> dmc_mmio_addr_sanity_check(). It's valid by
definition.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dmc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index 51109cb1d1b5..4cc62b040518 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -576,11 +576,6 @@ static bool dmc_mmio_addr_sanity_check(struct intel_dmc *dmc,
 	u32 start_range, end_range;
 	int i;
 
-	if (dmc_id >= DMC_FW_MAX) {
-		drm_warn(&i915->drm, "Unsupported firmware id %u\n", dmc_id);
-		return false;
-	}
-
 	if (header_ver == 1) {
 		start_range = DMC_MMIO_START_RANGE;
 		end_range = DMC_MMIO_END_RANGE;
-- 
2.34.1


  parent reply	other threads:[~2023-02-02 12:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 12:04 [Intel-gfx] [PATCH 0/5] drm/i915/dmc: some dmc id related fixes and cleanups Jani Nikula
2023-02-02 12:04 ` [Intel-gfx] [PATCH 1/5] drm/i915/dmc: add proper name to dmc id enum and use it Jani Nikula
2023-02-02 12:04 ` [Intel-gfx] [PATCH 2/5] drm/i915/dmc: add for_each_dmc_id() " Jani Nikula
2023-02-02 12:04 ` Jani Nikula [this message]
2023-02-02 12:04 ` [Intel-gfx] [PATCH 4/5] drm/i915/dmc: add is_valid_dmc_id() " Jani Nikula
2023-02-02 12:04 ` [Intel-gfx] [PATCH 5/5] drm/i915/dmc: check incoming dmc id validity Jani Nikula
2023-02-02 15:13   ` Imre Deak
2023-02-03 10:34     ` Jani Nikula
2023-02-02 14:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dmc: some dmc id related fixes and cleanups Patchwork
2023-02-02 14:29 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-02-02 18:05 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=b4e1c862687f79861a5fa4bfa6797ecda2136fab.1675339447.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.