From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759107AbcDEN4t (ORCPT ); Tue, 5 Apr 2016 09:56:49 -0400 Received: from mga11.intel.com ([192.55.52.93]:34719 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759038AbcDEN4s (ORCPT ); Tue, 5 Apr 2016 09:56:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,444,1455004800"; d="scan'208";a="952091612" From: Andy Shevchenko To: Dmitry Kasatkin , Mimi Zohar , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Andrew Morton , Rasmus Villemoes , linux-efi@vger.kernel.org, Matt Fleming , Arnd Bergmann , "Theodore Ts'o" Cc: Andy Shevchenko Subject: [PATCH v3 08/10] efi: redefine type, constant, macro from generic code Date: Tue, 5 Apr 2016 16:56:17 +0300 Message-Id: <1459864579-55988-9-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459864579-55988-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1459864579-55988-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Generic UUID library defines structure type, macro to define UUID, and the length of the UUID string. This patch removes duplicate data structure definition, UUID string length constant as well as macro for UUID handling. Signed-off-by: Andy Shevchenko --- include/linux/efi.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/linux/efi.h b/include/linux/efi.h index 1626474..5b1d5c5 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -43,17 +44,10 @@ typedef u16 efi_char16_t; /* UNICODE character */ typedef u64 efi_physical_addr_t; typedef void *efi_handle_t; - -typedef struct { - u8 b[16]; -} efi_guid_t; +typedef uuid_le efi_guid_t; #define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ -((efi_guid_t) \ -{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ - (b) & 0xff, ((b) >> 8) & 0xff, \ - (c) & 0xff, ((c) >> 8) & 0xff, \ - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) + UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) /* * Generic EFI table header @@ -1050,7 +1044,7 @@ efi_reboot(enum reboot_mode reboot_mode, const char *__unused) {} * Length of a GUID string (strlen("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")) * not including trailing NUL */ -#define EFI_VARIABLE_GUID_LEN 36 +#define EFI_VARIABLE_GUID_LEN UUID_STRING_LEN /* * The type of search to perform when calling boottime->locate_handle -- 2.8.0.rc3