All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense
@ 2020-04-22 13:03 Andy Shevchenko
  2020-06-18 10:57 ` Andy Shevchenko
  2020-06-18 15:18 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-04-22 13:03 UTC (permalink / raw)
  To: Richard Russon (FlatCap), Jens Axboe, linux-block, linux-ntfs-dev
  Cc: Andy Shevchenko

There is a specific API to treat raw data as UUID, i.e. import_uuid().
Use it instead of uuid_copy() with explicit casting.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 block/partitions/ldm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
index 6fdfcb40c537b..d333786b5c7eb 100644
--- a/block/partitions/ldm.c
+++ b/block/partitions/ldm.c
@@ -910,7 +910,7 @@ static bool ldm_parse_dsk4 (const u8 *buffer, int buflen, struct vblk *vb)
 		return false;
 
 	disk = &vb->vblk.disk;
-	uuid_copy(&disk->disk_id, (uuid_t *)(buffer + 0x18 + r_name));
+	import_uuid(&disk->disk_id, buffer + 0x18 + r_name);
 	return true;
 }
 
-- 
2.26.1


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

* Re: [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense
  2020-04-22 13:03 [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense Andy Shevchenko
@ 2020-06-18 10:57 ` Andy Shevchenko
  2020-06-18 15:18 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-06-18 10:57 UTC (permalink / raw)
  To: Richard Russon (FlatCap), Jens Axboe, linux-block, linux-ntfs-dev

On Wed, Apr 22, 2020 at 04:03:17PM +0300, Andy Shevchenko wrote:
> There is a specific API to treat raw data as UUID, i.e. import_uuid().
> Use it instead of uuid_copy() with explicit casting.

Any comment on this?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  block/partitions/ldm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
> index 6fdfcb40c537b..d333786b5c7eb 100644
> --- a/block/partitions/ldm.c
> +++ b/block/partitions/ldm.c
> @@ -910,7 +910,7 @@ static bool ldm_parse_dsk4 (const u8 *buffer, int buflen, struct vblk *vb)
>  		return false;
>  
>  	disk = &vb->vblk.disk;
> -	uuid_copy(&disk->disk_id, (uuid_t *)(buffer + 0x18 + r_name));
> +	import_uuid(&disk->disk_id, buffer + 0x18 + r_name);
>  	return true;
>  }
>  
> -- 
> 2.26.1
> 

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense
  2020-04-22 13:03 [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense Andy Shevchenko
  2020-06-18 10:57 ` Andy Shevchenko
@ 2020-06-18 15:18 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-06-18 15:18 UTC (permalink / raw)
  To: Andy Shevchenko, Richard Russon (FlatCap), linux-block, linux-ntfs-dev

On 4/22/20 7:03 AM, Andy Shevchenko wrote:
> There is a specific API to treat raw data as UUID, i.e. import_uuid().
> Use it instead of uuid_copy() with explicit casting.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2020-06-18 15:18 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:03 [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense Andy Shevchenko
2020-06-18 10:57 ` Andy Shevchenko
2020-06-18 15:18 ` Jens Axboe

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.