Linux-HyperV List
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>,
	linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v1] hyper-v: Use UUID API for exporting the GUID
Date: Wed, 22 Apr 2020 14:28:10 +0100	[thread overview]
Message-ID: <20200422132810.va2lrzjwbtcwlfpp@debian> (raw)
In-Reply-To: <20200422125937.38355-1-andriy.shevchenko@linux.intel.com>

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
> 

      reply	other threads:[~2020-04-22 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20200422132810.va2lrzjwbtcwlfpp@debian \
    --to=wei.liu@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=sthemmin@microsoft.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