lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181205172841.2ivcisxk2h7kul7e@earth.universe>
Date:   Wed, 5 Dec 2018 18:28:41 +0100
From:   Sebastian Reichel <sre@...labora.com>
To:     Colin King <colin.king@...onical.com>
Cc:     linux-pm@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: supply: cpcap-battery: make array
 cpcap_battery_irqs static, shrinks object size

Hi,

On Thu, Nov 29, 2018 at 11:03:42PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> 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 <colin.king@...onical.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/cpcap-battery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c
> index 98ba07869c3b..204e22e3e9b4 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"
>  	};
> -- 
> 2.19.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ