[PATCH v2] drm/xe: Don't use UTS_RELEASE directly
From: Uwe Kleine-König (The Capable Hub)
Date: Tue Apr 28 2026 - 06:39:06 EST
UTS_RELEASE evaluates to a static string and changes quite easily (e.g.
uncommitted changes in the source tree or new commits). So when checking
if a patch introduces changes to the resulting binary each usage of
UTS_RELEASE is source of annoyance.
Instead of using UTS_RELEASE directly use init_utsname()->release which
evaluates to the same string but with that a change of UTS_RELEASE
doesn't affect xe_devcoredump.o.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
Hello,
(implicit) v1 of this patch is available at
https://lore.kernel.org/20260427160902.1126027-2-u.kleine-koenig%40baylibre.com.
The only changes since then is that instead of dropping the kernel line,
init_utsname()->release is used, which is nearly what Jani Nikula
suggested.
Best regards
Uwe
drivers/gpu/drm/xe/xe_devcoredump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
index 558a1a9841a0..07c7c89240d8 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump.c
+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
@@ -8,7 +8,7 @@
#include <linux/ascii85.h>
#include <linux/devcoredump.h>
-#include <generated/utsrelease.h>
+#include <linux/utsname.h>
#include <drm/drm_managed.h>
@@ -101,7 +101,7 @@ static ssize_t __xe_devcoredump_read(char *buffer, ssize_t count,
drm_puts(&p, "**** Xe Device Coredump ****\n");
drm_printf(&p, "Reason: %s\n", ss->reason);
- drm_puts(&p, "kernel: " UTS_RELEASE "\n");
+ drm_printf(&p, "kernel: %s\n", init_utsname()->release);
drm_puts(&p, "module: " KBUILD_MODNAME "\n");
ts = ktime_to_timespec64(ss->snapshot_time);
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3