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]
Date:   Thu, 13 Jul 2017 23:40:05 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Colin King <colin.king@...onical.com>,
        Wim Van Sebroeck <wim@...ana.be>,
        linux-watchdog@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: w83627hf: make const array chip_name static

On 07/11/2017 08:23 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Don't populate array chip_name on the stack but instead make it static.
> Makes the object code smaller by 40 bytes:
> 
> Before:
>     text	   data	    bss	    dec	    hex	filename
>     5641	   2840	    384	   8865	   22a1	drivers/watchdog/w83627hf_wdt.o
> 
> After:
>     text	   data	    bss	    dec	    hex	filename
>     5545	   2896	    384	   8825	   2279	drivers/watchdog/w83627hf_wdt.o
> 
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/watchdog/w83627hf_wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index d9ba0496713c..7817836bff55 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -429,7 +429,7 @@ static int __init wdt_init(void)
>   {
>   	int ret;
>   	int chip;
> -	const char * const chip_name[] = {
> +	static const char * const chip_name[] = {
>   		"W83627HF",
>   		"W83627S",
>   		"W83697HF",
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ