drm/xe: Don't use UTS_RELEASE directly

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@baylibre.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patch.msgid.link/20260428102527.189593-2-u.kleine-koenig@baylibre.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Uwe Kleine-König (The Capable Hub) 2026-04-28 12:25:25 +02:00 committed by Rodrigo Vivi
parent e70d1c5fed
commit 3096d3e9f4
No known key found for this signature in database
GPG Key ID: FA625F640EEB13CA

View File

@ -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);