mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-20 07:36:37 -05:00
drm/xe: Fix END redefinition
mips declares an END macro in its headers so it can't be used without namespace in a driver like xe. Instead of coming up with a longer name, just remove the macro and replace its use with 0 since it's still clear what that means: set_offsets() was already using that implicitly when checking the data variable. Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: http://kisskb.ellerman.id.au/kisskb/buildresult/15143996/ Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240322145037.196548-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
@@ -115,7 +115,6 @@ static void set_offsets(u32 *regs,
|
||||
#define REG16(x) \
|
||||
(((x) >> 9) | BIT(7) | BUILD_BUG_ON_ZERO(x >= 0x10000)), \
|
||||
(((x) >> 2) & 0x7f)
|
||||
#define END 0
|
||||
{
|
||||
const u32 base = hwe->mmio_base;
|
||||
|
||||
@@ -186,7 +185,7 @@ static const u8 gen12_xcs_offsets[] = {
|
||||
REG16(0x274),
|
||||
REG16(0x270),
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 dg2_xcs_offsets[] = {
|
||||
@@ -220,7 +219,7 @@ static const u8 dg2_xcs_offsets[] = {
|
||||
REG16(0x274),
|
||||
REG16(0x270),
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 gen12_rcs_offsets[] = {
|
||||
@@ -316,7 +315,7 @@ static const u8 gen12_rcs_offsets[] = {
|
||||
REG(0x084),
|
||||
NOP(1),
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 xehp_rcs_offsets[] = {
|
||||
@@ -357,7 +356,7 @@ static const u8 xehp_rcs_offsets[] = {
|
||||
LRI(1, 0),
|
||||
REG(0x0c8),
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 dg2_rcs_offsets[] = {
|
||||
@@ -400,7 +399,7 @@ static const u8 dg2_rcs_offsets[] = {
|
||||
LRI(1, 0),
|
||||
REG(0x0c8),
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 mtl_rcs_offsets[] = {
|
||||
@@ -443,7 +442,7 @@ static const u8 mtl_rcs_offsets[] = {
|
||||
LRI(1, 0),
|
||||
REG(0x0c8),
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
#define XE2_CTX_COMMON \
|
||||
@@ -489,7 +488,7 @@ static const u8 xe2_rcs_offsets[] = {
|
||||
LRI(1, 0), /* [0x47] */
|
||||
REG(0x0c8), /* [0x48] R_PWR_CLK_STATE */
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 xe2_bcs_offsets[] = {
|
||||
@@ -500,16 +499,15 @@ static const u8 xe2_bcs_offsets[] = {
|
||||
REG16(0x200), /* [0x42] BCS_SWCTRL */
|
||||
REG16(0x204), /* [0x44] BLIT_CCTL */
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
static const u8 xe2_xcs_offsets[] = {
|
||||
XE2_CTX_COMMON,
|
||||
|
||||
END
|
||||
0
|
||||
};
|
||||
|
||||
#undef END
|
||||
#undef REG16
|
||||
#undef REG
|
||||
#undef LRI
|
||||
|
||||
Reference in New Issue
Block a user