Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1336327
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v1 09/10] efi: redefine type, constant, macro from generic code |
| Date | 2016-02-17 13:20 +0100 |
| Message-ID | <r39fk-6j5-23@gated-at.bofh.it> (permalink) |
| References | <r39fk-6j5-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
include/linux/efi.h | 14 ++++----------
include/linux/uuid.h | 2 +-
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 3c6cbbd..1a0dad5 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -21,6 +21,7 @@
#include <linux/pfn.h>
#include <linux/pstore.h>
#include <linux/reboot.h>
+#include <linux/uuid.h>
#include <asm/page.h>
@@ -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
@@ -1025,7 +1019,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
diff --git a/include/linux/uuid.h b/include/linux/uuid.h
index 6bd40d0..bb778a4 100644
--- a/include/linux/uuid.h
+++ b/include/linux/uuid.h
@@ -20,7 +20,7 @@
/*
* The length of a UUID string ("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
- * not including trailing NUL.
+ * excluding trailing NUL.
*/
#define UUID_STRING_LEN 36
--
2.7.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1 00/10] uuid: convert users to generic UUID API Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
[PATCH v1 09/10] efi: redefine type, constant, macro from generic code Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
[PATCH v1 10/10] efivars: use generic UUID library Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
Re: [PATCH v1 10/10] efivars: use generic UUID library Matt Fleming <matt@codeblueprint.co.uk> - 2016-02-18 16:10 +0100
[PATCH v1 05/10] ACPI: switch to use generic UUID API Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
Re: [PATCH v1 05/10] ACPI: switch to use generic UUID API Dan Williams <dan.j.williams@intel.com> - 2016-02-17 18:50 +0100
[PATCH v1 02/10] lib/uuid: move generate_random_uuid() to uuid.c Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
[PATCH v1 01/10] lib/vsprintf: simplify UUID printing Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
[PATCH v1 04/10] lib/uuid: remove FSF address Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:20 +0100
[PATCH v1 08/10] sysctl: use generic UUID library Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:30 +0100
[PATCH v1 06/10] device property: switch to use UUID API Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:30 +0100
Re: [PATCH v1 06/10] device property: switch to use UUID API "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-18 01:10 +0100
Re: [PATCH v1 06/10] device property: switch to use UUID API Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-02-18 12:10 +0100
[PATCH v1 03/10] lib/uuid: introduce few more generic helpers for UUID Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 13:30 +0100
csiph-web