drm/mst: switch to guid_gen() to generate valid GUIDs

Instead of just smashing jiffies into a GUID, use guid_gen() to generate
RFC 4122 compliant GUIDs.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812122312.1567046-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula
2024-08-12 15:23:11 +03:00
parent 33929707b8
commit 4548f10bf4
@@ -2698,18 +2698,10 @@ static void drm_dp_mst_link_probe_work(struct work_struct *work)
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;
}