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

ssb: make array pwr_info_offset static const, makes object smaller

Don't populate the array pwr_info_offset on the stack but instead make it
static const. Makes the object code smaller by 207 bytes.

Before:
text data bss dec hex filename
26066 3000 64 29130 71ca drivers/ssb/pci.o

After:
text data bss dec hex filename
25763 3096 64 28923 70fb drivers/ssb/pci.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Colin Ian King and committed by
Kalle Valo
d3bb2686 527c5d37

+1 -1
+1 -1
drivers/ssb/pci.c
··· 595 595 { 596 596 int i; 597 597 u16 o; 598 - u16 pwr_info_offset[] = { 598 + static const u16 pwr_info_offset[] = { 599 599 SSB_SROM8_PWR_INFO_CORE0, SSB_SROM8_PWR_INFO_CORE1, 600 600 SSB_SROM8_PWR_INFO_CORE2, SSB_SROM8_PWR_INFO_CORE3 601 601 };