Commit 36bdd0a7 authored by Arvind Sankar's avatar Arvind Sankar Committed by Ard Biesheuvel

efi/x86: Use efi_err for error messages

Use efi_err instead of bare efi_printk for error messages.
Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200430182843.2510180-5-nivedita@alum.mit.eduSigned-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 793473c2
...@@ -49,7 +49,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) ...@@ -49,7 +49,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, size, status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, size,
(void **)&rom); (void **)&rom);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to allocate memory for 'rom'\n"); efi_err("Failed to allocate memory for 'rom'\n");
return status; return status;
} }
...@@ -65,7 +65,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) ...@@ -65,7 +65,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
PCI_VENDOR_ID, 1, &rom->vendor); PCI_VENDOR_ID, 1, &rom->vendor);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to read rom->vendor\n"); efi_err("Failed to read rom->vendor\n");
goto free_struct; goto free_struct;
} }
...@@ -73,7 +73,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) ...@@ -73,7 +73,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
PCI_DEVICE_ID, 1, &rom->devid); PCI_DEVICE_ID, 1, &rom->devid);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to read rom->devid\n"); efi_err("Failed to read rom->devid\n");
goto free_struct; goto free_struct;
} }
...@@ -118,7 +118,7 @@ static void setup_efi_pci(struct boot_params *params) ...@@ -118,7 +118,7 @@ static void setup_efi_pci(struct boot_params *params)
(void **)&pci_handle); (void **)&pci_handle);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to allocate memory for 'pci_handle'\n"); efi_err("Failed to allocate memory for 'pci_handle'\n");
return; return;
} }
...@@ -172,7 +172,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params) ...@@ -172,7 +172,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params)
return; return;
if (efi_table_attr(p, version) != 0x10000) { if (efi_table_attr(p, version) != 0x10000) {
efi_printk("Unsupported properties proto version\n"); efi_err("Unsupported properties proto version\n");
return; return;
} }
...@@ -185,7 +185,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params) ...@@ -185,7 +185,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params)
size + sizeof(struct setup_data), size + sizeof(struct setup_data),
(void **)&new); (void **)&new);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to allocate memory for 'properties'\n"); efi_err("Failed to allocate memory for 'properties'\n");
return; return;
} }
...@@ -372,7 +372,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, ...@@ -372,7 +372,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
status = efi_bs_call(handle_protocol, handle, &proto, (void **)&image); status = efi_bs_call(handle_protocol, handle, &proto, (void **)&image);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to get handle for LOADED_IMAGE_PROTOCOL\n"); efi_err("Failed to get handle for LOADED_IMAGE_PROTOCOL\n");
efi_exit(handle, status); efi_exit(handle, status);
} }
...@@ -382,7 +382,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, ...@@ -382,7 +382,7 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
status = efi_allocate_pages(sizeof(struct boot_params), status = efi_allocate_pages(sizeof(struct boot_params),
(unsigned long *)&boot_params, ULONG_MAX); (unsigned long *)&boot_params, ULONG_MAX);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("Failed to allocate lowmem for boot params\n"); efi_err("Failed to allocate lowmem for boot params\n");
efi_exit(handle, status); efi_exit(handle, status);
} }
...@@ -749,7 +749,7 @@ unsigned long efi_main(efi_handle_t handle, ...@@ -749,7 +749,7 @@ unsigned long efi_main(efi_handle_t handle,
hdr->kernel_alignment, hdr->kernel_alignment,
LOAD_PHYSICAL_ADDR); LOAD_PHYSICAL_ADDR);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("efi_relocate_kernel() failed!\n"); efi_err("efi_relocate_kernel() failed!\n");
goto fail; goto fail;
} }
/* /*
...@@ -786,7 +786,7 @@ unsigned long efi_main(efi_handle_t handle, ...@@ -786,7 +786,7 @@ unsigned long efi_main(efi_handle_t handle,
efi_set_u64_split(size, &hdr->ramdisk_size, efi_set_u64_split(size, &hdr->ramdisk_size,
&boot_params->ext_ramdisk_size); &boot_params->ext_ramdisk_size);
} else if (status != EFI_NOT_FOUND) { } else if (status != EFI_NOT_FOUND) {
efi_printk("efi_load_initrd_dev_path() failed!\n"); efi_err("efi_load_initrd_dev_path() failed!\n");
goto fail; goto fail;
} }
} }
...@@ -813,13 +813,13 @@ unsigned long efi_main(efi_handle_t handle, ...@@ -813,13 +813,13 @@ unsigned long efi_main(efi_handle_t handle,
status = exit_boot(boot_params, handle); status = exit_boot(boot_params, handle);
if (status != EFI_SUCCESS) { if (status != EFI_SUCCESS) {
efi_printk("exit_boot() failed!\n"); efi_err("exit_boot() failed!\n");
goto fail; goto fail;
} }
return bzimage_addr; return bzimage_addr;
fail: fail:
efi_printk("efi_main() failed!\n"); efi_err("efi_main() failed!\n");
efi_exit(handle, status); efi_exit(handle, status);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment