diff options
| -rw-r--r-- | arch/ia64/kernel/efi.c | 4 | ||||
| -rw-r--r-- | arch/x86/platform/efi/efi.c | 6 | ||||
| -rw-r--r-- | include/linux/efi.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 121295637d0d..81416000c5e0 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
| @@ -757,14 +757,14 @@ efi_memmap_intersects (unsigned long phys_addr, unsigned long size) | |||
| 757 | return 0; | 757 | return 0; |
| 758 | } | 758 | } |
| 759 | 759 | ||
| 760 | u32 | 760 | int |
| 761 | efi_mem_type (unsigned long phys_addr) | 761 | efi_mem_type (unsigned long phys_addr) |
| 762 | { | 762 | { |
| 763 | efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); | 763 | efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); |
| 764 | 764 | ||
| 765 | if (md) | 765 | if (md) |
| 766 | return md->type; | 766 | return md->type; |
| 767 | return 0; | 767 | return -EINVAL; |
| 768 | } | 768 | } |
| 769 | 769 | ||
| 770 | u64 | 770 | u64 |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index f084d8718ac4..6217b23e85f6 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
| @@ -1035,12 +1035,12 @@ void __init efi_enter_virtual_mode(void) | |||
| 1035 | /* | 1035 | /* |
| 1036 | * Convenience functions to obtain memory types and attributes | 1036 | * Convenience functions to obtain memory types and attributes |
| 1037 | */ | 1037 | */ |
| 1038 | u32 efi_mem_type(unsigned long phys_addr) | 1038 | int efi_mem_type(unsigned long phys_addr) |
| 1039 | { | 1039 | { |
| 1040 | efi_memory_desc_t *md; | 1040 | efi_memory_desc_t *md; |
| 1041 | 1041 | ||
| 1042 | if (!efi_enabled(EFI_MEMMAP)) | 1042 | if (!efi_enabled(EFI_MEMMAP)) |
| 1043 | return 0; | 1043 | return -ENOTSUPP; |
| 1044 | 1044 | ||
| 1045 | for_each_efi_memory_desc(md) { | 1045 | for_each_efi_memory_desc(md) { |
| 1046 | if ((md->phys_addr <= phys_addr) && | 1046 | if ((md->phys_addr <= phys_addr) && |
| @@ -1048,7 +1048,7 @@ u32 efi_mem_type(unsigned long phys_addr) | |||
| 1048 | (md->num_pages << EFI_PAGE_SHIFT)))) | 1048 | (md->num_pages << EFI_PAGE_SHIFT)))) |
| 1049 | return md->type; | 1049 | return md->type; |
| 1050 | } | 1050 | } |
| 1051 | return 0; | 1051 | return -EINVAL; |
| 1052 | } | 1052 | } |
| 1053 | 1053 | ||
| 1054 | static int __init arch_parse_efi_cmdline(char *str) | 1054 | static int __init arch_parse_efi_cmdline(char *str) |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 8e24f099bd3f..4e47f78430be 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -985,7 +985,7 @@ static inline void efi_esrt_init(void) { } | |||
| 985 | extern int efi_config_parse_tables(void *config_tables, int count, int sz, | 985 | extern int efi_config_parse_tables(void *config_tables, int count, int sz, |
| 986 | efi_config_table_type_t *arch_tables); | 986 | efi_config_table_type_t *arch_tables); |
| 987 | extern u64 efi_get_iobase (void); | 987 | extern u64 efi_get_iobase (void); |
| 988 | extern u32 efi_mem_type (unsigned long phys_addr); | 988 | extern int efi_mem_type(unsigned long phys_addr); |
| 989 | extern u64 efi_mem_attributes (unsigned long phys_addr); | 989 | extern u64 efi_mem_attributes (unsigned long phys_addr); |
| 990 | extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); | 990 | extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); |
| 991 | extern int __init efi_uart_console_only (void); | 991 | extern int __init efi_uart_console_only (void); |
