All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/vmwgfx: Don't use UTS_RELEASE directly
@ 2026-05-04  7:34 Uwe Kleine-König (The Capable Hub)
  2026-06-10 17:00 ` Uwe Kleine-König (The Capable Hub)
  2026-06-10 22:04 ` Maaz Mombasawala
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-05-04  7:34 UTC (permalink / raw)
  To: Zack Rusin, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: Markus Schneider-Pargmann, Broadcom internal kernel review list,
	dri-devel, 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 vmwgfx_drv.o.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,

an alternative way to address this is to drop the kernel version string
completely. But I'm not sure how redundant this really is so I chose the
init_utsname() approach.

Best regards
Uwe

 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 0f101aedb49a..12f5f288ae15 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -24,7 +24,6 @@
 #include <drm/drm_sysfs.h>
 #include <drm/ttm/ttm_range_manager.h>
 #include <drm/ttm/ttm_placement.h>
-#include <generated/utsrelease.h>
 
 #ifdef CONFIG_X86
 #include <asm/hypervisor.h>
@@ -35,6 +34,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/utsname.h>
 #include <linux/version.h>
 #include <linux/vmalloc.h>
 
@@ -1115,7 +1115,7 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id)
 	vmw_print_sm_type(dev_priv);
 	vmw_host_printf("vmwgfx: Module Version: %d.%d.%d (kernel: %s)",
 			VMWGFX_DRIVER_MAJOR, VMWGFX_DRIVER_MINOR,
-			VMWGFX_DRIVER_PATCHLEVEL, UTS_RELEASE);
+			VMWGFX_DRIVER_PATCHLEVEL, init_utsname()->release);
 	vmw_write_driver_id(dev_priv);
 
 	dev_priv->pm_nb.notifier_call = vmwgfx_pm_notifier;

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
-- 
2.47.3


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

* Re: [PATCH] drm/vmwgfx: Don't use UTS_RELEASE directly
  2026-05-04  7:34 [PATCH] drm/vmwgfx: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
@ 2026-06-10 17:00 ` Uwe Kleine-König (The Capable Hub)
  2026-06-10 22:04 ` Maaz Mombasawala
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-10 17:00 UTC (permalink / raw)
  To: Zack Rusin, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: Markus Schneider-Pargmann, Broadcom internal kernel review list,
	dri-devel, linux-kernel

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

Hello,

On Mon, May 04, 2026 at 09:34:20AM +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 vmwgfx_drv.o.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
> 
> an alternative way to address this is to drop the kernel version string
> completely. But I'm not sure how redundant this really is so I chose the
> init_utsname() approach.

any feedback on this patch? Ideally something like "I applied it for
7.2-rc1, thanks!" :-D

Best regards
Uwe

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

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

* Re: [PATCH] drm/vmwgfx: Don't use UTS_RELEASE directly
  2026-05-04  7:34 [PATCH] drm/vmwgfx: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
  2026-06-10 17:00 ` Uwe Kleine-König (The Capable Hub)
@ 2026-06-10 22:04 ` Maaz Mombasawala
  1 sibling, 0 replies; 3+ messages in thread
From: Maaz Mombasawala @ 2026-06-10 22:04 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub), Zack Rusin,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
  Cc: Markus Schneider-Pargmann, Broadcom internal kernel review list,
	dri-devel, linux-kernel

On 5/4/26 12:34 AM, 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 vmwgfx_drv.o.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
> 
> an alternative way to address this is to drop the kernel version string
> completely. But I'm not sure how redundant this really is so I chose the
> init_utsname() approach.
> 
> Best regards
> Uwe
> 
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index 0f101aedb49a..12f5f288ae15 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -24,7 +24,6 @@
>  #include <drm/drm_sysfs.h>
>  #include <drm/ttm/ttm_range_manager.h>
>  #include <drm/ttm/ttm_placement.h>
> -#include <generated/utsrelease.h>
>  
>  #ifdef CONFIG_X86
>  #include <asm/hypervisor.h>
> @@ -35,6 +34,7 @@
>  #include <linux/dma-mapping.h>
>  #include <linux/module.h>
>  #include <linux/pci.h>
> +#include <linux/utsname.h>
>  #include <linux/version.h>
>  #include <linux/vmalloc.h>
>  
> @@ -1115,7 +1115,7 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id)
>  	vmw_print_sm_type(dev_priv);
>  	vmw_host_printf("vmwgfx: Module Version: %d.%d.%d (kernel: %s)",
>  			VMWGFX_DRIVER_MAJOR, VMWGFX_DRIVER_MINOR,
> -			VMWGFX_DRIVER_PATCHLEVEL, UTS_RELEASE);
> +			VMWGFX_DRIVER_PATCHLEVEL, init_utsname()->release);
>  	vmw_write_driver_id(dev_priv);
>  
>  	dev_priv->pm_nb.notifier_call = vmwgfx_pm_notifier;
> 
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731

LGTM!

Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>

Sorry for missing this patch earlier. Unfortunately our maintainer Zack
is out for two weeks so we'll merge this patch at that time.

-- 
Maaz Mombasawala <maaz.mombasawala@broadcom.com>

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

end of thread, other threads:[~2026-06-10 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04  7:34 [PATCH] drm/vmwgfx: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
2026-06-10 17:00 ` Uwe Kleine-König (The Capable Hub)
2026-06-10 22:04 ` Maaz Mombasawala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.