public inbox for intel-gfx@lists.freedesktop.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: [PATCH RESEND FOR THE Nth AND LAST TIME 1/5] drm/i915/opregion: use BUILD_BUG_ON to verify mailbox struct sizes
Date: Thu,  2 Jul 2015 17:43:21 +0300	[thread overview]
Message-ID: <1435848205-8317-1-git-send-email-jani.nikula@intel.com> (raw)

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

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 71e87abdcae7..c4756a2d77bb 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -862,6 +862,11 @@ int intel_opregion_setup(struct drm_device *dev)
 	char buf[sizeof(OPREGION_SIGNATURE)];
 	int err = 0;
 
+	BUILD_BUG_ON(sizeof(struct opregion_header) != 0x100);
+	BUILD_BUG_ON(sizeof(struct opregion_acpi) != 0x100);
+	BUILD_BUG_ON(sizeof(struct opregion_swsci) != 0x100);
+	BUILD_BUG_ON(sizeof(struct opregion_asle) != 0x100);
+
 	pci_read_config_dword(dev->pdev, PCI_ASLS, &asls);
 	DRM_DEBUG_DRIVER("graphic opregion physical addr: 0x%x\n", asls);
 	if (asls == 0) {
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-07-02 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 14:43 Jani Nikula [this message]
2015-07-02 14:43 ` [PATCH RESEND FOR THE Nth AND LAST TIME 2/5] drm/i915/opregion: add new opregion stuff Jani Nikula
2015-07-02 14:43 ` [PATCH RESEND FOR THE Nth AND LAST TIME 3/5] drm/i915/opregion: prefer DRM logging functions over pr_warn and dev_dbg Jani Nikula
2015-07-02 14:43 ` [PATCH RESEND FOR THE Nth AND LAST TIME 4/5] drm/i915/opregion: abstract didl and did2 getter and setter Jani Nikula
2015-07-02 14:43 ` [PATCH RESEND FOR THE Nth AND LAST TIME 5/5] drm/i915/opregion: start using extended didl Jani Nikula
2015-07-02 14:48 ` [PATCH RESEND FOR THE Nth AND LAST TIME 1/5] drm/i915/opregion: use BUILD_BUG_ON to verify mailbox struct sizes Chris Wilson
2015-07-06  9:37   ` Daniel Vetter

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=1435848205-8317-1-git-send-email-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox