aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-04-04 08:25:46 -0400
committerMatt Fleming <matt.fleming@intel.com>2014-04-14 12:49:20 -0400
commit9403e462fb5ffa9eeaa9663cb23ded02b7e603a3 (patch)
tree66b76b18362a3d914b36a67d951732e95d1f7954
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
efi: efi-stub-helper cleanup
An #ifdef CONFIG_ARM clause in efi-stub-helper.c got included with some of the generic stub rework by Roy Franz. Drop it here to make subsequent patches less confusing. Also, In handle_cmdline_files(), fh is not initialized, and while the overall logic around this handling appears safe, gcc does not always pick this up. Initialize to NULL to remove the resulting warning. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--drivers/firmware/efi/efi-stub-helper.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c
index 2c41eaece2c1..47722003b8fc 100644
--- a/drivers/firmware/efi/efi-stub-helper.c
+++ b/drivers/firmware/efi/efi-stub-helper.c
@@ -267,7 +267,7 @@ static efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg,
267 struct file_info *files; 267 struct file_info *files;
268 unsigned long file_addr; 268 unsigned long file_addr;
269 u64 file_size_total; 269 u64 file_size_total;
270 efi_file_handle_t *fh; 270 efi_file_handle_t *fh = NULL;
271 efi_status_t status; 271 efi_status_t status;
272 int nr_files; 272 int nr_files;
273 char *str; 273 char *str;
@@ -536,18 +536,8 @@ static char *efi_convert_cmdline_to_ascii(efi_system_table_t *sys_table_arg,
536 } 536 }
537 537
538 options_size++; /* NUL termination */ 538 options_size++; /* NUL termination */
539#ifdef CONFIG_ARM 539
540 /* 540 status = efi_low_alloc(sys_table_arg, options_size, 0, &cmdline_addr);
541 * For ARM, allocate at a high address to avoid reserved
542 * regions at low addresses that we don't know the specfics of
543 * at the time we are processing the command line.
544 */
545 status = efi_high_alloc(sys_table_arg, options_size, 0,
546 &cmdline_addr, 0xfffff000);
547#else
548 status = efi_low_alloc(sys_table_arg, options_size, 0,
549 &cmdline_addr);
550#endif
551 if (status != EFI_SUCCESS) 541 if (status != EFI_SUCCESS)
552 return NULL; 542 return NULL;
553 543