]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Don't use UTS_RELEASE directly
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 28 Apr 2026 10:25:25 +0000 (12:25 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 28 Apr 2026 20:20:33 +0000 (16:20 -0400)
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>
drivers/gpu/drm/xe/xe_devcoredump.c

index ec206f512795d69cac21b3084a5cd0f545ba9079..5f2b90b18f97b7b5d3d7d98a27e446d4fb62d0f2 100644 (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);