mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/msm: Don't use UTS_RELEASE directly
@ 2026-04-28 14:45 Uwe Kleine-König (The Capable Hub)
  2026-04-28 15:56 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-04-28 14:45 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, David Airlie, Simona Vetter,
	Kees Cook, Andy Shevchenko
  Cc: Markus Schneider-Pargmann, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, Konrad Dybcio, Akhil P Oommen,
	linux-arm-msm, dri-devel, freedreno, linux-kernel

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>
---
 drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 4 ++--
 drivers/gpu/drm/msm/msm_gpu.c                     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
index 427d3ee2b833..c6eda3cf2e62 100644
--- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
+++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
@@ -5,7 +5,7 @@
 
 #define pr_fmt(fmt)	"[drm:%s:%d] " fmt, __func__, __LINE__
 
-#include <generated/utsrelease.h>
+#include <linux/utsname.h>
 
 #include "msm_disp_snapshot.h"
 
@@ -79,7 +79,7 @@ void msm_disp_state_print(struct msm_disp_state *state, struct drm_printer *p)
 	}
 
 	drm_printf(p, "---\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, "dpu devcoredump\n");
 	drm_printf(p, "time: %ptSp\n", &state->time);
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 930e54d1b0a7..3f3925b11eea 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -13,11 +13,11 @@
 #include "msm_gpu_trace.h"
 //#include "adreno/adreno_gpu.h"
 
-#include <generated/utsrelease.h>
 #include <linux/string_helpers.h>
 #include <linux/devcoredump.h>
 #include <linux/sched/task.h>
 #include <linux/sched/mm.h>
+#include <linux/utsname.h>
 
 /*
  * Power Management:
@@ -196,7 +196,7 @@ static ssize_t msm_gpu_devcoredump_read(char *buffer, loff_t offset,
 	p = drm_coredump_printer(&iter);
 
 	drm_printf(&p, "---\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", &state->time);
 	if (state->comm)

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
-- 
2.47.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm: Don't use UTS_RELEASE directly
  2026-04-28 14:45 [PATCH] drm/msm: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
@ 2026-04-28 15:56 ` Andy Shevchenko
  2026-04-28 16:39   ` Uwe Kleine-König (The Capable Hub)
  2026-04-28 16:39 ` Akhil P Oommen
  2026-04-28 19:44 ` Dmitry Baryshkov
  2 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2026-04-28 15:56 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub)
  Cc: Rob Clark, Dmitry Baryshkov, David Airlie, Simona Vetter,
	Kees Cook, Markus Schneider-Pargmann, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, Konrad Dybcio,
	Akhil P Oommen, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

On Tue, Apr 28, 2026 at 04:45:53PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> 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.

Would you like to submit similar changes against driver/auxdisplay?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm: Don't use UTS_RELEASE directly
  2026-04-28 15:56 ` Andy Shevchenko
@ 2026-04-28 16:39   ` Uwe Kleine-König (The Capable Hub)
  2026-04-29  6:14     ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-04-28 16:39 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rob Clark, Dmitry Baryshkov, David Airlie, Simona Vetter,
	Kees Cook, Markus Schneider-Pargmann, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, Konrad Dybcio,
	Akhil P Oommen, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Hello Andy,

On Tue, Apr 28, 2026 at 06:56:15PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 28, 2026 at 04:45:53PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > 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.
> 
> Would you like to submit similar changes against driver/auxdisplay?

These didn't pollute my build results so far, so my pressure is small.
(Two of the three are not relevant for an allmodconfig build and the
third depends on PLAT_VERSATILE which isn't in my build matrix.)

I assume you ask because if I say no you'd address that? In that case
please go on.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm: Don't use UTS_RELEASE directly
  2026-04-28 14:45 [PATCH] drm/msm: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
  2026-04-28 15:56 ` Andy Shevchenko
@ 2026-04-28 16:39 ` Akhil P Oommen
  2026-04-28 19:44 ` Dmitry Baryshkov
  2 siblings, 0 replies; 6+ messages in thread
From: Akhil P Oommen @ 2026-04-28 16:39 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub),
	Rob Clark, Dmitry Baryshkov, David Airlie, Simona Vetter,
	Kees Cook, Andy Shevchenko
  Cc: Markus Schneider-Pargmann, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, Konrad Dybcio, linux-arm-msm,
	dri-devel, freedreno, linux-kernel

On 4/28/2026 8:15 PM, Uwe Kleine-König (The Capable Hub) wrote:
> 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>

Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>

-Akhil.

> ---
>  drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 4 ++--
>  drivers/gpu/drm/msm/msm_gpu.c                     | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> index 427d3ee2b833..c6eda3cf2e62 100644
> --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> @@ -5,7 +5,7 @@
>  
>  #define pr_fmt(fmt)	"[drm:%s:%d] " fmt, __func__, __LINE__
>  
> -#include <generated/utsrelease.h>
> +#include <linux/utsname.h>
>  
>  #include "msm_disp_snapshot.h"
>  
> @@ -79,7 +79,7 @@ void msm_disp_state_print(struct msm_disp_state *state, struct drm_printer *p)
>  	}
>  
>  	drm_printf(p, "---\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, "dpu devcoredump\n");
>  	drm_printf(p, "time: %ptSp\n", &state->time);
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index 930e54d1b0a7..3f3925b11eea 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
> @@ -13,11 +13,11 @@
>  #include "msm_gpu_trace.h"
>  //#include "adreno/adreno_gpu.h"
>  
> -#include <generated/utsrelease.h>
>  #include <linux/string_helpers.h>
>  #include <linux/devcoredump.h>
>  #include <linux/sched/task.h>
>  #include <linux/sched/mm.h>
> +#include <linux/utsname.h>
>  
>  /*
>   * Power Management:
> @@ -196,7 +196,7 @@ static ssize_t msm_gpu_devcoredump_read(char *buffer, loff_t offset,
>  	p = drm_coredump_printer(&iter);
>  
>  	drm_printf(&p, "---\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", &state->time);
>  	if (state->comm)
> 
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm: Don't use UTS_RELEASE directly
  2026-04-28 14:45 [PATCH] drm/msm: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
  2026-04-28 15:56 ` Andy Shevchenko
  2026-04-28 16:39 ` Akhil P Oommen
@ 2026-04-28 19:44 ` Dmitry Baryshkov
  2 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2026-04-28 19:44 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub)
  Cc: Rob Clark, Dmitry Baryshkov, David Airlie, Simona Vetter,
	Kees Cook, Andy Shevchenko, Markus Schneider-Pargmann,
	Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
	Konrad Dybcio, Akhil P Oommen, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Tue, Apr 28, 2026 at 04:45:53PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> 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>
> ---
>  drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 4 ++--
>  drivers/gpu/drm/msm/msm_gpu.c                     | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/msm: Don't use UTS_RELEASE directly
  2026-04-28 16:39   ` Uwe Kleine-König (The Capable Hub)
@ 2026-04-29  6:14     ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-04-29  6:14 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub)
  Cc: Rob Clark, Dmitry Baryshkov, David Airlie, Simona Vetter,
	Kees Cook, Markus Schneider-Pargmann, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, Konrad Dybcio,
	Akhil P Oommen, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

On Tue, Apr 28, 2026 at 06:39:53PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> On Tue, Apr 28, 2026 at 06:56:15PM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 28, 2026 at 04:45:53PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > > 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.
> > 
> > Would you like to submit similar changes against driver/auxdisplay?
> 
> These didn't pollute my build results so far, so my pressure is small.
> (Two of the three are not relevant for an allmodconfig build and the
> third depends on PLAT_VERSATILE which isn't in my build matrix.)
> 
> I assume you ask because if I say no you'd address that? In that case
> please go on.

Okay, noted.
Thanks for bringing in the way how to solve it!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-29  6:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-28 14:45 [PATCH] drm/msm: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
2026-04-28 15:56 ` Andy Shevchenko
2026-04-28 16:39   ` Uwe Kleine-König (The Capable Hub)
2026-04-29  6:14     ` Andy Shevchenko
2026-04-28 16:39 ` Akhil P Oommen
2026-04-28 19:44 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®