From patchwork Wed Apr 22 13:03:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11503833 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D670913 for ; Wed, 22 Apr 2020 13:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E7AA206EC for ; Wed, 22 Apr 2020 13:03:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726284AbgDVNDU (ORCPT ); Wed, 22 Apr 2020 09:03:20 -0400 Received: from mga01.intel.com ([192.55.52.88]:18799 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbgDVNDU (ORCPT ); Wed, 22 Apr 2020 09:03:20 -0400 IronPort-SDR: +qMZtMTJkR2hOGLgf+CcLCV/vokRVERX3r4lp44VGxF8rfXVI5xL0j4OdMKoH8Fi4TE2Dp3n9L dcSQc/vbHT3g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 06:03:20 -0700 IronPort-SDR: p23+6rBA3QDR5/MsAuw5wRg/51MtFoQOG1G3J3+YqZbElGpAjAK0kc3TTcxuwxOheK2NIV1Tqy wdD6YefPabcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,414,1580803200"; d="scan'208";a="290827168" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 22 Apr 2020 06:03:19 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0ECB558F; Wed, 22 Apr 2020 16:03:17 +0300 (EEST) From: Andy Shevchenko To: "Richard Russon (FlatCap)" , Jens Axboe , linux-block@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net Cc: Andy Shevchenko Subject: [PATCH v1] partitions/ldm: Replace uuid_copy() with import_uuid() where it makes sense Date: Wed, 22 Apr 2020 16:03:17 +0300 Message-Id: <20200422130317.38683-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 --- 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; }