Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/boot/efi: Remove unused variables

Fix gcc warnings:

arch/x86/boot/compressed/eboot.c: In function 'make_boot_params':
arch/x86/boot/compressed/eboot.c:394:6: warning: unused variable 'i' [-Wunused-variable]
int i;
^
arch/x86/boot/compressed/eboot.c:393:6: warning: unused variable 's1' [-Wunused-variable]
u8 *s1;
^
arch/x86/boot/compressed/eboot.c:392:7: warning: unused variable 's2' [-Wunused-variable]
u16 *s2;
^
arch/x86/boot/compressed/eboot.c:387:8: warning: unused variable 'options' [-Wunused-variable]
void *options, *handle;
^
arch/x86/boot/compressed/eboot.c: In function 'add_e820ext':
arch/x86/boot/compressed/eboot.c:498:16: warning: unused variable 'size' [-Wunused-variable]
unsigned long size;
^
arch/x86/boot/compressed/eboot.c:497:15: warning: unused variable 'status' [-Wunused-variable]
efi_status_t status;
^
arch/x86/boot/compressed/eboot.c: In function 'exit_boot_func':
arch/x86/boot/compressed/eboot.c:681:15: warning: unused variable 'status' [-Wunused-variable]
efi_status_t status;
^
arch/x86/boot/compressed/eboot.c:680:8: warning: unused variable 'nr_desc' [-Wunused-variable]
__u32 nr_desc;
^
arch/x86/boot/compressed/eboot.c: In function 'efi_main':
arch/x86/boot/compressed/eboot.c:750:22: warning: unused variable 'image' [-Wunused-variable]
efi_loaded_image_t *image;
^

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1563282957-26898-1-git-send-email-zhenzhong.duan@oracle.com

authored by

Zhenzhong Duan and committed by
Thomas Gleixner
cd6697b8 a0d14b89

+1 -9
+1 -9
arch/x86/boot/compressed/eboot.c
··· 384 384 struct apm_bios_info *bi; 385 385 struct setup_header *hdr; 386 386 efi_loaded_image_t *image; 387 - void *options, *handle; 387 + void *handle; 388 388 efi_guid_t proto = LOADED_IMAGE_PROTOCOL_GUID; 389 389 int options_size = 0; 390 390 efi_status_t status; 391 391 char *cmdline_ptr; 392 - u16 *s2; 393 - u8 *s1; 394 - int i; 395 392 unsigned long ramdisk_addr; 396 393 unsigned long ramdisk_size; 397 394 ··· 491 494 struct setup_data *e820ext, u32 nr_entries) 492 495 { 493 496 struct setup_data *data; 494 - efi_status_t status; 495 - unsigned long size; 496 497 497 498 e820ext->type = SETUP_E820_EXT; 498 499 e820ext->len = nr_entries * sizeof(struct boot_e820_entry); ··· 672 677 void *priv) 673 678 { 674 679 const char *signature; 675 - __u32 nr_desc; 676 - efi_status_t status; 677 680 struct exit_boot_struct *p = priv; 678 681 679 682 signature = efi_is_64bit() ? EFI64_LOADER_SIGNATURE ··· 740 747 efi_main(struct efi_config *c, struct boot_params *boot_params) 741 748 { 742 749 struct desc_ptr *gdt = NULL; 743 - efi_loaded_image_t *image; 744 750 struct setup_header *hdr = &boot_params->hdr; 745 751 efi_status_t status; 746 752 struct desc_struct *desc;