Commit 4548f10b authored by Jani Nikula's avatar Jani Nikula

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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812122312.1567046-2-jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 33929707
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment