efi: Fix typo in description string
PATCH 1/5 efi: Fix typo in description string
s/Conosle/Console/
--- common/efi-guid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/efi-guid.c +1 -1
@@ -52,7 +52,7 @@ const char *efi_guid_string(efi_guid_t *g)EFI_GUID_STRING (EFI_ISA_IO_PROTOCOL_GUID ,"ISA IO Protocol" ,"ISA IO Protocol" );EFI_GUID_STRING (EFI_STANDARD_ERROR_DEVICE_GUID ,"Standard Error Device Guid" ,"EFI Standard Error Device Guid" );EFI_GUID_STRING (EFI_CONSOLE_OUT_DEVICE_GUID ,"Console Out Device Guid" ,"EFI Console Out Device Guid" ); -EFI_GUID_STRING (EFI_CONSOLE_IN_DEVICE_GUID ,"Console In Device Guid" ,"EFI Conosle In Device Guid" ); +EFI_GUID_STRING (EFI_CONSOLE_IN_DEVICE_GUID ,"Console In Device Guid" ,"EFI Console In Device Guid" );EFI_GUID_STRING (EFI_SIMPLE_TEXT_OUT_PROTOCOL_GUID ,"Simple Text Out Protocol" ,"EFI 1.0 Simple Text Out Protocol" );EFI_GUID_STRING (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID ,"Simple Text Input Ex Protocol" ,"UEFI 2.1 Simple Text Input Ex Protocol" );EFI_GUID_STRING (EFI_SIMPLE_TEXT_IN_PROTOCOL_GUID ,"Simple Text In Protocol" ,"EFI 1.0 Simple Text In Protocol" );
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/5 efi: retire efi_compare_guid in favor of efi_guidcmp
Both functions wrap the same memcmp except that one uses pointers to GUIDs and the other passes the GUIDs by value.
The function is static inline, so it doesn't really matter which one we keep. We'll drop efi_compare_guid because it's been used once only in the code base so far.
--- common/efi-devicepath.c | 2 +- include/efi.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-)
common/efi-devicepath.c +1 -1
@@ -572,7 +572,7 @@ dev_path_vendor(struct string *str, void *dev_path) }cprintf (str,"Ven%s(%pU" , type, &Vendor->Guid); -if (efi_compare_guid (&Vendor->Guid, &efi_unknown_device_guid) ==0 ) { +if (efi_guidcmp (Vendor->Guid, efi_unknown_device_guid) ==0 ) {/* GUID used by EFI to enumerate an EDD 1.1 device */ unknown_dev_path = (struct unknown_device_vendor_device_path *) Vendor;
include/efi.h +0 -5
@@ -664,11 +664,6 @@ typedef union {efi_ipv6_address v6; } efi_ip_address; -static inline int efi_compare_guid (efi_guid_t *a,efi_guid_t *b) -{ -return memcmp (a, b,sizeof (efi_guid_t)); -} -struct efi_device_path *device_path_from_handle (efi_handle_t Handle);char *device_path_to_str (struct efi_device_path *dev_path);u8 device_path_to_type (struct efi_device_path *dev_path);
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/5 efi: use efi_guidcmp helper where appropriate
In reply to Ahmad FatoumWe have a helper for it. Let's use it.
--- drivers/efi/efi-device.c | 2 +- fs/efivarfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/efi/efi-device.c +1 -1
@@ -311,7 +311,7 @@ static int efi_bus_match(struct device_d *dev, struct driver_d *drv)int i;for (i =0 ; i < efidev->num_guids; i++) { -if (!memcmp (&efidrv->guid, &efidev->guids[i],sizeof (efi_guid_t))) { +if (!efi_guidcmp (efidrv->guid, efidev->guids[i])) {BS ->handle_protocol (efidev->handle, &efidev->guids[i], &efidev->protocol);return 0 ;
fs/efivarfs.c +1 -1
@@ -145,7 +145,7 @@ static int efivars_create(struct device_d *dev, const char *pathname, mode_t modif (ret)return -ENOENT ; -if (memcmp (&vendor, &EFI_BAREBOX_VENDOR_GUID ,sizeof (efi_guid_t))) +if (efi_guidcmp (vendor,EFI_BAREBOX_VENDOR_GUID ))return -EPERM ; inode =xzalloc (sizeof (*inode));
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/5 x86: include: add asmlinkage 'storage class'
In reply to Ahmad FatoumWe've a number of C functions with external linkage that are only called from assembly. -Wmissing-prototypes warns about these unless they have a prototype that goes unused. Let's standardize on using the asmlinkage 'storage class' to mark such declarations.
As <linux/linkage.h> defines asmlinkage to naught unless <asm/linkage.h> does, it's sufficient to add an empty header to make this usable on x86 as well.
--- arch/x86/include/asm/linkage.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 arch/x86/include/asm/linkage.h
arch/x86/include/asm/linkage.h new file +6 -0
@@ -0,0 +1,6 @@ +#ifndef __ASM_LINKAGE_H +#define __ASM_LINKAGE_H + +/* referenced by <linux/linkage.h> */ + +#endif
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/5 efi: silence warning about un-prototyped assembly-called functions
In reply to Ahmad FatoumBoth _relocate and efi_main are only called from assembly, but -Wmissing-prototypes doesn't know that and warns about them. Pre-declare prototypes to silence the warnings.
--- arch/x86/mach-efi/reloc_x86_64.c | 3 +++ common/efi/efi.c | 3 +++ 2 files changed, 6 insertions(+)
arch/x86/mach-efi/reloc_x86_64.c +3 -0
@@ -35,11 +35,14 @@SUCH DAMAGE. */ +#include <linux/linkage.h> #include <common.h> #include <efi.h> #include <elf.h> +asmlinkage efi_status_t _relocate (long, Elf64_Dyn *, efi_handle_t, efi_system_table_t *); +efi_status_t _relocate (long ldbase,Elf64_Dyn *dyn,efi_handle_t image,efi_system_table_t *systab) {long relsz =0 , relent =0 ;
common/efi/efi.c +3 -0
@@ -17,6 +17,7 @@* */ +#include <linux/linkage.h> #include <common.h> #include <linux/sizes.h> #include <memory.h>
@@ -318,6 +319,8 @@ static int efi_init(void) }device_initcall (efi_init); +asmlinkage efi_status_t efi_main(efi_handle_t, efi_system_table_t *); +/** * efi-main - Entry point for EFI images */
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 6 lines · Ahmad Fatoum
s/Conosle/Console/
Signed-off-by Ahmad Fatoum <[email protected]>--- common/efi-guid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox