Commit 0322fa12 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Michał Winiarski

drm/xe: Assert size of the struct xe_reg

We want to keep the struct xe_reg as small as possible.
Make sure we don't accidentally change its size.
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240314173130.1177-2-michal.wajdeczko@intel.comSigned-off-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
parent bde5d767
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment