Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org
Subject: Re: [RESEND 2/3] drm/mst: switch to guid_gen() to generate valid GUIDs
Date: Wed, 28 Aug 2024 15:16:33 +0200	[thread overview]
Message-ID: <Zs8jMZadvxeGhTjn@phenom.ffwll.local> (raw)
In-Reply-To: <20240812122312.1567046-2-jani.nikula@intel.com>

On Mon, Aug 12, 2024 at 03:23:11PM +0300, Jani Nikula wrote:
> Instead of just smashing jiffies into a GUID, use guid_gen() to generate
> RFC 4122 compliant GUIDs.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Read a bit the RFC, definitely sounds better than stuffing jiffies into
the guid ...

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/display/drm_dp_mst_topology.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 39f1dc45004e..38a9a1441e62 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -2700,18 +2700,10 @@ static void drm_dp_mst_queue_probe_work(struct drm_dp_mst_topology_mgr *mgr)
>  static bool drm_dp_validate_guid(struct drm_dp_mst_topology_mgr *mgr,
>  				 guid_t *guid)
>  {
> -	u64 salt;
> -	u8 buf[UUID_SIZE];
> -
>  	if (!guid_is_null(guid))
>  		return true;
>  
> -	salt = get_jiffies_64();
> -
> -	memcpy(&buf[0], &salt, sizeof(u64));
> -	memcpy(&buf[8], &salt, sizeof(u64));
> -
> -	import_guid(guid, buf);
> +	guid_gen(guid);
>  
>  	return false;
>  }
> -- 
> 2.39.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2024-08-28 13:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 12:23 [RESEND 1/3] drm/mst: switch to guid_t type for GUID Jani Nikula
2024-08-12 12:23 ` [RESEND 2/3] drm/mst: switch to guid_gen() to generate valid GUIDs Jani Nikula
2024-08-28 13:16   ` Daniel Vetter [this message]
2024-08-12 12:23 ` [RESEND 3/3] drm/amd/display: " Jani Nikula
2024-08-28 13:20   ` Daniel Vetter
2024-08-28 13:40     ` Jani Nikula
2024-08-28 13:58       ` Alex Deucher
2024-08-28 15:08         ` Harry Wentland
2024-08-29  9:32           ` Jani Nikula
2024-08-28 13:53   ` Hamza Mahfooz
2024-08-28 14:06     ` Jani Nikula
2024-08-28 15:10       ` Jani Nikula
2024-08-28 15:13       ` Hamza Mahfooz
2024-08-12 14:19 ` ✗ Fi.CI.SPARSE: warning for series starting with [RESEND,1/3] drm/mst: switch to guid_t type for GUID Patchwork
2024-08-12 14:34 ` ✓ Fi.CI.BAT: success " Patchwork
2024-08-13  0:39 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-28 13:00 ` [RESEND 1/3] " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zs8jMZadvxeGhTjn@phenom.ffwll.local \
    --to=daniel.vetter@ffwll.ch \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox