]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Don't use UTS_RELEASE directly
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 28 Apr 2026 14:47:03 +0000 (16:47 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jun 2026 22:23:43 +0000 (18:23 -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 amdgpu_dev_coredump.o.

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260428144704.1114562-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d785df5598fd1d1cc2f2f45c05448271b6d490b7)

drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c

index bed68f0c30806aef9b906ba36882cd2e27a207d6..322c55aaf15f71ef838e0f6f874e3081dc0baa88 100644 (file)
@@ -22,8 +22,8 @@
  *
  */
 
-#include <generated/utsrelease.h>
 #include <linux/devcoredump.h>
+#include <linux/utsname.h>
 #include "amdgpu_dev_coredump.h"
 #include "atom.h"
 
@@ -237,7 +237,7 @@ amdgpu_devcoredump_format(char *buffer, size_t count, struct amdgpu_coredump_inf
 
        drm_printf(&p, "**** AMDGPU Device Coredump ****\n");
        drm_printf(&p, "version: " AMDGPU_COREDUMP_VERSION "\n");
-       drm_printf(&p, "kernel: " UTS_RELEASE "\n");
+       drm_printf(&p, "kernel: %s\n", init_utsname()->release);
        drm_printf(&p, "module: " KBUILD_MODNAME "\n");
        drm_printf(&p, "time: %ptSp\n", &coredump->reset_time);