From: Colin Ian King Date: Thu, 29 Nov 2018 23:03:42 +0000 (+0000) Subject: power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks object... X-Git-Tag: v5.4-rc1~1929^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd82ef08382f8b4b8ff476ece065f14b1e8f47e5;p=platform%2Fkernel%2Flinux-rpi.git power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks object size Don't populate the array cpcap_battery_irqs on the stack but instead make it static. Makes the object code smaller by 99 bytes: Before: text data bss dec hex filename 13673 2448 0 16121 3ef9 cpcap-battery.o After: text data bss dec hex filename 13510 2512 0 16022 3e96 cpcap-battery.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c index 98ba078..08d5037 100644 --- a/drivers/power/supply/cpcap-battery.c +++ b/drivers/power/supply/cpcap-battery.c @@ -620,7 +620,7 @@ static int cpcap_battery_init_irq(struct platform_device *pdev, static int cpcap_battery_init_interrupts(struct platform_device *pdev, struct cpcap_battery_ddata *ddata) { - const char * const cpcap_battery_irqs[] = { + static const char * const cpcap_battery_irqs[] = { "eol", "lowbph", "lowbpl", "chrgcurr1", "battdetb" };