Commit e484c594 authored by Arvind Sankar's avatar Arvind Sankar Committed by Ard Biesheuvel

efi/gop: Move variable declarations into loop block

Declare the variables inside the block where they're used.

Get rid of a couple of redundant initializers.
Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200320020028.1936003-7-nivedita@alum.mit.eduSigned-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 8e0a22e2
...@@ -88,16 +88,19 @@ setup_pixel_info(struct screen_info *si, u32 pixels_per_scan_line, ...@@ -88,16 +88,19 @@ setup_pixel_info(struct screen_info *si, u32 pixels_per_scan_line,
static efi_graphics_output_protocol_t * static efi_graphics_output_protocol_t *
find_gop(efi_guid_t *proto, unsigned long size, void **handles) find_gop(efi_guid_t *proto, unsigned long size, void **handles)
{ {
efi_graphics_output_protocol_t *gop, *first_gop; efi_graphics_output_protocol_t *first_gop;
efi_graphics_output_protocol_mode_t *mode;
efi_graphics_output_mode_info_t *info = NULL;
efi_status_t status;
efi_handle_t h; efi_handle_t h;
int i; int i;
first_gop = NULL; first_gop = NULL;
for_each_efi_handle(h, handles, size, i) { for_each_efi_handle(h, handles, size, i) {
efi_status_t status;
efi_graphics_output_protocol_t *gop;
efi_graphics_output_protocol_mode_t *mode;
efi_graphics_output_mode_info_t *info;
efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID; efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID;
void *dummy = NULL; void *dummy = NULL;
...@@ -136,7 +139,7 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, ...@@ -136,7 +139,7 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
{ {
efi_graphics_output_protocol_t *gop; efi_graphics_output_protocol_t *gop;
efi_graphics_output_protocol_mode_t *mode; efi_graphics_output_protocol_mode_t *mode;
efi_graphics_output_mode_info_t *info = NULL; efi_graphics_output_mode_info_t *info;
efi_physical_addr_t fb_base; efi_physical_addr_t fb_base;
gop = find_gop(proto, size, handles); gop = find_gop(proto, size, handles);
......
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