From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH 1/6] drm/xe: Assert size of the struct xe_reg
Date: Tue, 16 Jan 2024 15:56:12 +0100 [thread overview]
Message-ID: <20240116145617.1177-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240116145617.1177-1-michal.wajdeczko@intel.com>
We want to keep the struct xe_reg as small as possible.
Make sure we don't accidentally change its size.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
drivers/gpu/drm/xe/regs/xe_reg_defs.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/xe/regs/xe_reg_defs.h b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
index c50e7650c09a..114b07db962f 100644
--- a/drivers/gpu/drm/xe/regs/xe_reg_defs.h
+++ b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
@@ -6,6 +6,8 @@
#ifndef _XE_REG_DEFS_H_
#define _XE_REG_DEFS_H_
+#include <linux/build_bug.h>
+
#include "compat-i915-headers/i915_reg_defs.h"
/**
@@ -44,6 +46,7 @@ struct xe_reg {
u32 raw;
};
};
+static_assert(sizeof(struct xe_reg) == sizeof(u32));
/**
* struct xe_reg_mcr - MCR register definition
--
2.25.1
next prev parent reply other threads:[~2024-01-16 14:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 14:56 [PATCH 0/6] Update MMIO read/write functions Michal Wajdeczko
2024-01-16 14:56 ` Michal Wajdeczko [this message]
2024-01-17 23:21 ` [PATCH 1/6] drm/xe: Assert size of the struct xe_reg Matt Roper
2024-01-16 14:56 ` [PATCH 2/6] drm/xe: Define XE_REG_OPTION_VF Michal Wajdeczko
2024-01-17 23:23 ` Matt Roper
2024-01-17 23:36 ` Lucas De Marchi
2024-01-16 14:56 ` [PATCH 3/6] drm/xe: Mark VF accessible GuC registers Michal Wajdeczko
2024-01-17 23:26 ` Matt Roper
2024-01-16 14:56 ` [PATCH 4/6] drm/xe: Mark VF accessible global registers Michal Wajdeczko
2024-01-17 23:28 ` Matt Roper
2024-01-16 14:56 ` [PATCH 5/6] drm/xe: Mark VF accessible GT registers Michal Wajdeczko
2024-01-17 23:41 ` Matt Roper
2024-02-13 18:41 ` Michal Wajdeczko
2024-01-16 14:56 ` [PATCH 6/6] drm/xe: Make xe_mmio_read|write() functions non-inline Michal Wajdeczko
2024-01-17 23:43 ` Matt Roper
2024-01-16 14:59 ` ✓ CI.Patch_applied: success for Update MMIO read/write functions Patchwork
2024-01-16 14:59 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-16 15:00 ` ✓ CI.KUnit: success " Patchwork
2024-01-16 15:07 ` ✓ CI.Build: " Patchwork
2024-01-16 15:07 ` ✓ CI.Hooks: " Patchwork
2024-01-16 15:09 ` ✓ CI.checksparse: " Patchwork
2024-01-16 15:31 ` ✓ CI.BAT: " 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=20240116145617.1177-2-michal.wajdeczko@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@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