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

include/linux/efi.h: redefine type, constant, macro from generic code

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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andy Shevchenko and committed by
Linus Torvalds
ba7e34b1 ede9c277

+4 -10
+4 -10
include/linux/efi.h
··· 21 21 #include <linux/pfn.h> 22 22 #include <linux/pstore.h> 23 23 #include <linux/reboot.h> 24 + #include <linux/uuid.h> 24 25 #include <linux/screen_info.h> 25 26 26 27 #include <asm/page.h> ··· 45 44 typedef u64 efi_physical_addr_t; 46 45 typedef void *efi_handle_t; 47 46 48 - 49 - typedef struct { 50 - u8 b[16]; 51 - } efi_guid_t; 47 + typedef uuid_le efi_guid_t; 52 48 53 49 #define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ 54 - ((efi_guid_t) \ 55 - {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ 56 - (b) & 0xff, ((b) >> 8) & 0xff, \ 57 - (c) & 0xff, ((c) >> 8) & 0xff, \ 58 - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) 50 + UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) 59 51 60 52 /* 61 53 * Generic EFI table header ··· 1111 1117 * Length of a GUID string (strlen("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")) 1112 1118 * not including trailing NUL 1113 1119 */ 1114 - #define EFI_VARIABLE_GUID_LEN 36 1120 + #define EFI_VARIABLE_GUID_LEN UUID_STRING_LEN 1115 1121 1116 1122 /* 1117 1123 * The type of search to perform when calling boottime->locate_handle