]> Git Repo - linux.git/commitdiff
efi: Make const array 'apple' static
authorColin Ian King <[email protected]>
Thu, 8 Mar 2018 08:00:20 +0000 (08:00 +0000)
committerIngo Molnar <[email protected]>
Fri, 9 Mar 2018 08:30:35 +0000 (09:30 +0100)
Don't populate the const read-only array 'buf' on the stack but instead
make it static. Makes the object code smaller by 64 bytes:

Before:
   text    data     bss     dec     hex filename
   9264       1      16    9281    2441 arch/x86/boot/compressed/eboot.o

After:
   text    data     bss     dec     hex filename
   9200       1      16    9217    2401 arch/x86/boot/compressed/eboot.o

(GCC version 7.2.0 x86_64)

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/boot/compressed/eboot.c

index 886a9115af6229d058cab4f0600ebd666fc9e6d3..f2251c1c98536663aa513196ce2528de2e12af7d 100644 (file)
@@ -423,7 +423,7 @@ static void retrieve_apple_device_properties(struct boot_params *boot_params)
 
 static void setup_quirks(struct boot_params *boot_params)
 {
-       efi_char16_t const apple[] = { 'A', 'p', 'p', 'l', 'e', 0 };
+       static efi_char16_t const apple[] = { 'A', 'p', 'p', 'l', 'e', 0 };
        efi_char16_t *fw_vendor = (efi_char16_t *)(unsigned long)
                efi_table_attr(efi_system_table, fw_vendor, sys_table);
 
This page took 0.063764 seconds and 4 git commands to generate.