提交 9403e462 编写于 作者: L Leif Lindholm 提交者: Matt Fleming

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: NLeif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
上级 c9eaa447
...@@ -267,7 +267,7 @@ static efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, ...@@ -267,7 +267,7 @@ static efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg,
struct file_info *files; struct file_info *files;
unsigned long file_addr; unsigned long file_addr;
u64 file_size_total; u64 file_size_total;
efi_file_handle_t *fh; efi_file_handle_t *fh = NULL;
efi_status_t status; efi_status_t status;
int nr_files; int nr_files;
char *str; char *str;
...@@ -536,18 +536,8 @@ static char *efi_convert_cmdline_to_ascii(efi_system_table_t *sys_table_arg, ...@@ -536,18 +536,8 @@ static char *efi_convert_cmdline_to_ascii(efi_system_table_t *sys_table_arg,
} }
options_size++; /* NUL termination */ options_size++; /* NUL termination */
#ifdef CONFIG_ARM
/* status = efi_low_alloc(sys_table_arg, options_size, 0, &cmdline_addr);
* 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
if (status != EFI_SUCCESS) if (status != EFI_SUCCESS)
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册