All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: tvrtko.ursulin@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: [bug report] drm/i915: Introduce concept of a sub-platform
Date: Wed, 3 Apr 2019 08:58:40 +0300	[thread overview]
Message-ID: <20190403055840.GA26766@kadam> (raw)

Hello Tvrtko Ursulin,

The patch 805446c8347c: "drm/i915: Introduce concept of a
sub-platform" from Mar 27, 2019, leads to the following static
checker warning:

	drivers/gpu/drm/i915/intel_device_info.c:807 intel_device_info_subplatform_init()
	error: uninitialized symbol 'mask'.

drivers/gpu/drm/i915/intel_device_info.c
    774 void intel_device_info_subplatform_init(struct drm_i915_private *i915)
    775 {
    776 	const struct intel_device_info *info = INTEL_INFO(i915);
    777 	const struct intel_runtime_info *rinfo = RUNTIME_INFO(i915);
    778 	const unsigned int pi = __platform_mask_index(rinfo, info->platform);
    779 	const unsigned int pb = __platform_mask_bit(rinfo, info->platform);
    780 	u16 devid = INTEL_DEVID(i915);
    781 	u32 mask;
    782 
    783 	/* Make sure IS_<platform> checks are working. */
    784 	RUNTIME_INFO(i915)->platform_mask[pi] = BIT(pb);
    785 
    786 	/* Find and mark subplatform bits based on the PCI device id. */
    787 	if (find_devid(devid, subplatform_ult_ids,
    788 		       ARRAY_SIZE(subplatform_ult_ids))) {
    789 		mask = BIT(INTEL_SUBPLATFORM_ULT);
    790 	} else if (find_devid(devid, subplatform_ulx_ids,
    791 			      ARRAY_SIZE(subplatform_ulx_ids))) {
    792 		mask = BIT(INTEL_SUBPLATFORM_ULX);
    793 		if (IS_HASWELL(i915) || IS_BROADWELL(i915)) {
    794 			/* ULX machines are also considered ULT. */
    795 			mask |= BIT(INTEL_SUBPLATFORM_ULT);
    796 		}
    797 	} else if (find_devid(devid, subplatform_aml_ids,
    798 			      ARRAY_SIZE(subplatform_aml_ids))) {
    799 		mask = BIT(INTEL_SUBPLATFORM_AML);
    800 	} else if (find_devid(devid, subplatform_portf_ids,
    801 			      ARRAY_SIZE(subplatform_portf_ids))) {
    802 		mask = BIT(INTEL_SUBPLATFORM_PORTF);
    803 	}

No else statement

    804 
    805 	GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_BITS);
    806 
--> 807 	RUNTIME_INFO(i915)->platform_mask[pi] |= mask;
                                                         ^^^^

    808 }

regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

                 reply	other threads:[~2019-04-03  7:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190403055840.GA26766@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@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.