Message ID | 20170906144932.24403-1-xypron.glpk@gmx.de |
---|---|
State | Superseded, archived |
Delegated to: | Alexander Graf |
Headers | show |
Series | [U-Boot,1/1] efi_loader: move efi_guid_t typedef to efi.h | expand |
On 06.09.17 16:49, Heinrich Schuchardt wrote: > efi_guid_t is used both in efi_api.h and in part_efi.h. > Both include efi.h. So we should move the typedef to > the common include. This saves us from including > part_efi.h in places where we don't need it. > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Won't that break the case where GUID partition table support is enabled, but efi is not? Alex > --- > download.suse.org seems to be down. > So I was no able to test on Travis CI. > I just built for vexpress and x86. > --- > include/efi.h | 3 +++ > include/part_efi.h | 4 ---- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/include/efi.h b/include/efi.h > index 02b78b31b1..6cb7db1ea5 100644 > --- a/include/efi.h > +++ b/include/efi.h > @@ -81,6 +81,9 @@ typedef unsigned long efi_status_t; > typedef u64 efi_physical_addr_t; > typedef u64 efi_virtual_addr_t; > typedef void *efi_handle_t; > +typedef struct { > + u8 b[16]; > +} efi_guid_t; > > #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ > ((efi_guid_t) \ > diff --git a/include/part_efi.h b/include/part_efi.h > index 317c044795..31e6bc6e14 100644 > --- a/include/part_efi.h > +++ b/include/part_efi.h > @@ -58,10 +58,6 @@ > /* linux/include/efi.h */ > typedef u16 efi_char16_t; > > -typedef struct { > - u8 b[16]; > -} efi_guid_t; > - > /* based on linux/include/genhd.h */ > struct partition { > u8 boot_ind; /* 0x80 - active */ >
On 09/06/2017 05:22 PM, Alexander Graf wrote: > > > On 06.09.17 16:49, Heinrich Schuchardt wrote: >> efi_guid_t is used both in efi_api.h and in part_efi.h. >> Both include efi.h. So we should move the typedef to >> the common include. This saves us from including >> part_efi.h in places where we don't need it. >> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > > Won't that break the case where GUID partition table support is enabled, > but efi is not? > > > Alex > I moved the definition of efi_guid_t from part_efi.h to efi.h. The definition is placed in a part of efi.h that is not enclosed in any #if*. include/part_efi.h has this line: #include <efi.h> So any program including part_efi.h will still see the definition. Best regards Heinrich >> --- >> download.suse.org seems to be down. >> So I was no able to test on Travis CI. >> I just built for vexpress and x86. >> --- >> include/efi.h | 3 +++ >> include/part_efi.h | 4 ---- >> 2 files changed, 3 insertions(+), 4 deletions(-) >> >> diff --git a/include/efi.h b/include/efi.h >> index 02b78b31b1..6cb7db1ea5 100644 >> --- a/include/efi.h >> +++ b/include/efi.h >> @@ -81,6 +81,9 @@ typedef unsigned long efi_status_t; >> typedef u64 efi_physical_addr_t; >> typedef u64 efi_virtual_addr_t; >> typedef void *efi_handle_t; >> +typedef struct { >> + u8 b[16]; >> +} efi_guid_t; >> #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ >> ((efi_guid_t) \ >> diff --git a/include/part_efi.h b/include/part_efi.h >> index 317c044795..31e6bc6e14 100644 >> --- a/include/part_efi.h >> +++ b/include/part_efi.h >> @@ -58,10 +58,6 @@ >> /* linux/include/efi.h */ >> typedef u16 efi_char16_t; >> -typedef struct { >> - u8 b[16]; >> -} efi_guid_t; >> - >> /* based on linux/include/genhd.h */ >> struct partition { >> u8 boot_ind; /* 0x80 - active */ >> >
diff --git a/include/efi.h b/include/efi.h index 02b78b31b1..6cb7db1ea5 100644 --- a/include/efi.h +++ b/include/efi.h @@ -81,6 +81,9 @@ typedef unsigned long efi_status_t; typedef u64 efi_physical_addr_t; typedef u64 efi_virtual_addr_t; typedef void *efi_handle_t; +typedef struct { + u8 b[16]; +} efi_guid_t; #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ ((efi_guid_t) \ diff --git a/include/part_efi.h b/include/part_efi.h index 317c044795..31e6bc6e14 100644 --- a/include/part_efi.h +++ b/include/part_efi.h @@ -58,10 +58,6 @@ /* linux/include/efi.h */ typedef u16 efi_char16_t; -typedef struct { - u8 b[16]; -} efi_guid_t; - /* based on linux/include/genhd.h */ struct partition { u8 boot_ind; /* 0x80 - active */
efi_guid_t is used both in efi_api.h and in part_efi.h. Both include efi.h. So we should move the typedef to the common include. This saves us from including part_efi.h in places where we don't need it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- download.suse.org seems to be down. So I was no able to test on Travis CI. I just built for vexpress and x86. --- include/efi.h | 3 +++ include/part_efi.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-)