All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] libnvdimm: Replace guid_copy() with import_guid() where it makes sense
@ 2020-04-22 13:05 Andy Shevchenko
  2020-04-22 17:10 ` Ira Weiny
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2020-04-22 13:05 UTC (permalink / raw)
  To: Dan Williams, Vishal Verma, Dave Jiang, Ira Weiny, linux-nvdimm
  Cc: Andy Shevchenko

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] libnvdimm: Replace guid_copy() with import_guid() where it makes sense
  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
  2020-04-22 23:43   ` Dan Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Ira Weiny @ 2020-04-22 17:10 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-nvdimm

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] libnvdimm: Replace guid_copy() with import_guid() where it makes sense
  2020-04-22 17:10 ` Ira Weiny
@ 2020-04-22 23:43   ` Dan Williams
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Williams @ 2020-04-22 23:43 UTC (permalink / raw)
  To: Ira Weiny; +Cc: Andy Shevchenko, linux-nvdimm

On Wed, Apr 22, 2020 at 10:10 AM Ira Weiny <ira.weiny@intel.com> wrote:
>
> 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>

Looks good, applied for 5.8.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-22 23:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-04-22 23:43   ` Dan Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.