From: Ira Weiny <ira.weiny@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-nvdimm@lists.01.org
Subject: Re: [PATCH v1] libnvdimm: Replace guid_copy() with import_guid() where it makes sense
Date: Wed, 22 Apr 2020 10:10:23 -0700 [thread overview]
Message-ID: <20200422171023.GJ3372712@iweiny-DESK2.sc.intel.com> (raw)
In-Reply-To: <20200422130539.45636-1-andriy.shevchenko@linux.intel.com>
On Wed, Apr 22, 2020 at 04:05:39PM +0300, Andy Shevchenko wrote:
> There is a specific API to treat raw data as GUID, i.e. import_guid().
> Use it instead of guid_copy() with explicit casting.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> ---
> drivers/acpi/nfit/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index fa4500f9cfd13..7c138a4edc03e 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -2293,7 +2293,7 @@ static int acpi_nfit_init_interleave_set(struct acpi_nfit_desc *acpi_desc,
> nd_set = devm_kzalloc(dev, sizeof(*nd_set), GFP_KERNEL);
> if (!nd_set)
> return -ENOMEM;
> - guid_copy(&nd_set->type_guid, (guid_t *) spa->range_guid);
> + import_guid(&nd_set->type_guid, spa->range_guid);
>
> info = devm_kzalloc(dev, sizeof_nfit_set_info(nr), GFP_KERNEL);
> if (!info)
> --
> 2.26.1
>
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2020-04-22 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 13:05 [PATCH v1] libnvdimm: Replace guid_copy() with import_guid() where it makes sense Andy Shevchenko
2020-04-22 17:10 ` Ira Weiny [this message]
2020-04-22 23:43 ` Dan Williams
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=20200422171023.GJ3372712@iweiny-DESK2.sc.intel.com \
--to=ira.weiny@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-nvdimm@lists.01.org \
/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;
as well as URLs for NNTP newsgroup(s).