Merge tag 'cxl-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
[sfrench/cifs-2.6.git] / drivers / nvdimm / btt.c
index 4295fa8094209b56bd06308a8db30f1d05cee8fe..f10a50ffa047e1bd06cc38175ef63c475d6be719 100644 (file)
@@ -973,7 +973,7 @@ static int btt_arena_write_layout(struct arena_info *arena)
        u64 sum;
        struct btt_sb *super;
        struct nd_btt *nd_btt = arena->nd_btt;
-       const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev);
+       const uuid_t *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev);
 
        ret = btt_map_init(arena);
        if (ret)
@@ -988,8 +988,8 @@ static int btt_arena_write_layout(struct arena_info *arena)
                return -ENOMEM;
 
        strncpy(super->signature, BTT_SIG, BTT_SIG_LEN);
-       memcpy(super->uuid, nd_btt->uuid, 16);
-       memcpy(super->parent_uuid, parent_uuid, 16);
+       export_uuid(super->uuid, nd_btt->uuid);
+       export_uuid(super->parent_uuid, parent_uuid);
        super->flags = cpu_to_le32(arena->flags);
        super->version_major = cpu_to_le16(arena->version_major);
        super->version_minor = cpu_to_le16(arena->version_minor);
@@ -1574,7 +1574,8 @@ static void btt_blk_cleanup(struct btt *btt)
  * Pointer to a new struct btt on success, NULL on failure.
  */
 static struct btt *btt_init(struct nd_btt *nd_btt, unsigned long long rawsize,
-               u32 lbasize, u8 *uuid, struct nd_region *nd_region)
+                           u32 lbasize, uuid_t *uuid,
+                           struct nd_region *nd_region)
 {
        int ret;
        struct btt *btt;
@@ -1693,7 +1694,7 @@ int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns)
        }
        nd_region = to_nd_region(nd_btt->dev.parent);
        btt = btt_init(nd_btt, rawsize, nd_btt->lbasize, nd_btt->uuid,
-                       nd_region);
+                      nd_region);
        if (!btt)
                return -ENOMEM;
        nd_btt->btt = btt;