Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lightnvm: pblk: Replace guid_copy() with export_guid()/import_guid()

There is a specific API to treat raw data as GUID, i.e. export_guid()
and import_guid(). Use them instead of guid_copy() with explicit casting.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Andy Shevchenko and committed by
Jens Axboe
f4b64ae6 4cf29e43

+3 -5
+2 -3
drivers/lightnvm/pblk-core.c
··· 988 988 bitmap_set(line->lun_bitmap, 0, lm->lun_bitmap_len); 989 989 990 990 smeta_buf->header.identifier = cpu_to_le32(PBLK_MAGIC); 991 - guid_copy((guid_t *)&smeta_buf->header.uuid, &pblk->instance_uuid); 991 + export_guid(smeta_buf->header.uuid, &pblk->instance_uuid); 992 992 smeta_buf->header.id = cpu_to_le32(line->id); 993 993 smeta_buf->header.type = cpu_to_le16(line->type); 994 994 smeta_buf->header.version_major = SMETA_VERSION_MAJOR; ··· 1803 1803 1804 1804 if (le32_to_cpu(emeta_buf->header.identifier) != PBLK_MAGIC) { 1805 1805 emeta_buf->header.identifier = cpu_to_le32(PBLK_MAGIC); 1806 - guid_copy((guid_t *)&emeta_buf->header.uuid, 1807 - &pblk->instance_uuid); 1806 + export_guid(emeta_buf->header.uuid, &pblk->instance_uuid); 1808 1807 emeta_buf->header.id = cpu_to_le32(line->id); 1809 1808 emeta_buf->header.type = cpu_to_le16(line->type); 1810 1809 emeta_buf->header.version_major = EMETA_VERSION_MAJOR;
+1 -2
drivers/lightnvm/pblk-recovery.c
··· 706 706 707 707 /* The first valid instance uuid is used for initialization */ 708 708 if (!valid_uuid) { 709 - guid_copy(&pblk->instance_uuid, 710 - (guid_t *)&smeta_buf->header.uuid); 709 + import_guid(&pblk->instance_uuid, smeta_buf->header.uuid); 711 710 valid_uuid = 1; 712 711 } 713 712