* [PATCH v1] hyper-v: Use UUID API for exporting the GUID
@ 2020-04-22 12:59 Andy Shevchenko
2020-04-22 13:28 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2020-04-22 12:59 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
linux-hyperv
Cc: Andy Shevchenko
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 <andriy.shevchenko@linux.intel.com>
---
drivers/hv/hv_trace.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/hv_trace.h b/drivers/hv/hv_trace.h
index a43bc76c2d5d0..579d19bdc0981 100644
--- a/drivers/hv/hv_trace.h
+++ b/drivers/hv/hv_trace.h
@@ -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, "
--
2.26.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] hyper-v: Use UUID API for exporting the GUID
2020-04-22 12:59 [PATCH v1] hyper-v: Use UUID API for exporting the GUID Andy Shevchenko
@ 2020-04-22 13:28 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2020-04-22 13:28 UTC (permalink / raw)
To: Andy Shevchenko
Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
linux-hyperv
On Wed, Apr 22, 2020 at 03:59:37PM +0300, Andy Shevchenko wrote:
> 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 <andriy.shevchenko@linux.intel.com>
> ---
> drivers/hv/hv_trace.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hv/hv_trace.h b/drivers/hv/hv_trace.h
> index a43bc76c2d5d0..579d19bdc0981 100644
> --- a/drivers/hv/hv_trace.h
> +++ b/drivers/hv/hv_trace.h
> @@ -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.
> __entry->ret = ret;
> ),
> TP_printk("sending guest_endpoint_id %pUl, host_service_id %pUl, "
> --
> 2.26.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-22 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 12:59 [PATCH v1] hyper-v: Use UUID API for exporting the GUID Andy Shevchenko
2020-04-22 13:28 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).