aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-04-04 13:25:46 +0100
committerMark Brown <broonie@linaro.org>2014-06-16 21:33:55 +0100
commit3de27ccc9bc06ebbde620ed2057bf7eb765c5858 (patch)
treec0a67d80c43b02f1bf3bf233a634d8bb50a527b3
parent28a86520a1de542b17fcba08e23f7c661e759ecd (diff)
downloadlinux-linaro-stable-3de27ccc9bc06ebbde620ed2057bf7eb765c5858.tar.gz
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> (cherry picked from commit 9403e462fb5ffa9eeaa9663cb23ded02b7e603a3) Signed-off-by: Mark Brown <broonie@linaro.org>
-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,
struct file_info *files;
unsigned long file_addr;
u64 file_size_total;
- efi_file_handle_t *fh;
+ efi_file_handle_t *fh = NULL;
efi_status_t status;
int nr_files;
char *str;
@@ -536,18 +536,8 @@ static char *efi_convert_cmdline_to_ascii(efi_system_table_t *sys_table_arg,
}
options_size++; /* NUL termination */
-#ifdef CONFIG_ARM
- /*
- * For ARM, allocate at a high address to avoid reserved
- * regions at low addresses that we don't know the specfics of
- * at the time we are processing the command line.
- */
- status = efi_high_alloc(sys_table_arg, options_size, 0,
- &cmdline_addr, 0xfffff000);
-#else
- status = efi_low_alloc(sys_table_arg, options_size, 0,
- &cmdline_addr);
-#endif
+
+ status = efi_low_alloc(sys_table_arg, options_size, 0, &cmdline_addr);
if (status != EFI_SUCCESS)
return NULL;