hyper-v: Use UUID API for exporting the GUID
Subsystems (2)
PATCH 1/1 hyper-v: Use UUID API for exporting the GUID
There is export_guid() function which exports guid_t to the u8 array. Use it instead of open coding variant.
This allows to hide the uuid_t internals.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/hv/hv_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hv/hv_trace.h +2 -2
@@ -286,8 +286,8 @@ TRACE_EVENT(vmbus_send_tl_connect_request,__field (int, ret) ),TP_fast_assign ( - memcpy(__entry->guest_id, &msg->guest_endpoint_id.b, 16); -memcpy (__entry->host_id, &msg->host_service_id.b,16 ); + export_guid(__entry->guest_id, &msg->guest_endpoint_id); +export_guid (__entry->host_id, &msg->host_service_id); __entry->ret = ret; ), TP_printk("sending guest_endpoint_id %pUl, host_service_id %pUl, "
Signature · 1 line
2.26.1
Wei Liu
maintainerQuoted 15 lines · Andy Shevchenko
There is
export_guid()function which exportsguid_tto the u8 array. Use it instead of open coding variant.This allows to hide the
uuid_tinternals.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/hv/hv_trace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/hv/hv_trace.h +0
-0
drivers/hv/hv_trace.h TRACE_EVENT(vmbus_send_tl_connect_request, · line 290
Quoted 7 lines
drivers/hv/hv_trace.h +2
-2@@ -286,8 +286,8 @@ TRACE_EVENT(vmbus_send_tl_connect_request,__field (int, ret) ),TP_fast_assign ( - memcpy(__entry->guest_id, &msg->guest_endpoint_id.b, 16); -memcpy (__entry->host_id, &msg->host_service_id.b,16 ); + export_guid(__entry->guest_id, &msg->guest_endpoint_id); +export_guid (__entry->host_id, &msg->host_service_id);
I was about to say I couldn't find this function but it seems to have been introduced in d01cd62400b which is currently in Linus' master branch. That's fine then.
I will queue this up to hyperv-fixes for 5.7.
Wei.
Quoted 6 lines
drivers/hv/hv_trace.h +0
-0__entry->ret = ret; ), TP_printk("sending guest_endpoint_id %pUl, host_service_id %pUl, "Signature · 1 line
2.26.1