Skip to content

Commit 3f9ed5f

Browse files
ukleinekRob Clark
authored andcommitted
drm/msm: 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 msm_disp_snapshot_util.o or msm_gpu.o. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Patchwork: https://patchwork.freedesktop.org/patch/721948/ Message-ID: <20260428144553.1103785-2-u.kleine-koenig@baylibre.com> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
1 parent b5c7a7f commit 3f9ed5f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
77

8-
#include <generated/utsrelease.h>
8+
#include <linux/utsname.h>
99

1010
#include "msm_disp_snapshot.h"
1111

@@ -79,7 +79,7 @@ void msm_disp_state_print(struct msm_disp_state *state, struct drm_printer *p)
7979
}
8080

8181
drm_printf(p, "---\n");
82-
drm_printf(p, "kernel: " UTS_RELEASE "\n");
82+
drm_printf(p, "kernel: %s\n", init_utsname()->release);
8383
drm_printf(p, "module: " KBUILD_MODNAME "\n");
8484
drm_printf(p, "dpu devcoredump\n");
8585
drm_printf(p, "time: %ptSp\n", &state->time);

drivers/gpu/drm/msm/msm_gpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#include "msm_gpu_trace.h"
1414
//#include "adreno/adreno_gpu.h"
1515

16-
#include <generated/utsrelease.h>
1716
#include <linux/string_helpers.h>
1817
#include <linux/devcoredump.h>
1918
#include <linux/sched/task.h>
2019
#include <linux/sched/mm.h>
20+
#include <linux/utsname.h>
2121

2222
/*
2323
* Power Management:
@@ -196,7 +196,7 @@ static ssize_t msm_gpu_devcoredump_read(char *buffer, loff_t offset,
196196
p = drm_coredump_printer(&iter);
197197

198198
drm_printf(&p, "---\n");
199-
drm_printf(&p, "kernel: " UTS_RELEASE "\n");
199+
drm_printf(&p, "kernel: %s\n", init_utsname()->release);
200200
drm_printf(&p, "module: " KBUILD_MODNAME "\n");
201201
drm_printf(&p, "time: %ptSp\n", &state->time);
202202
if (state->comm)

0 commit comments

Comments
 (0)