linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: arizona: make array mclk_name static, shrinks object size
@ 2018-09-04 14:15 Colin King
  2018-09-05  9:15 ` Charles Keepax
  2018-09-11 14:00 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-09-04 14:15 UTC (permalink / raw)
  To: Lee Jones, patches; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Don't populate the array mclk_name on the stack but instead make it
static. Makes the object code smaller by 23 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
  38050	  11604	     64	  49718	   c236	linux/drivers/mfd/arizona-core.o

After:
   text	   data	    bss	    dec	    hex	filename
  38027	  11604	     64	  49695	   c21f	linux/drivers/mfd/arizona-core.o

(gcc version 8.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mfd/arizona-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 5f1e37d23943..918d81a00b37 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -990,7 +990,7 @@ static const struct mfd_cell wm8998_devs[] = {
 
 int arizona_dev_init(struct arizona *arizona)
 {
-	const char * const mclk_name[] = { "mclk1", "mclk2" };
+	static const char * const mclk_name[] = { "mclk1", "mclk2" };
 	struct device *dev = arizona->dev;
 	const char *type_name = NULL;
 	unsigned int reg, val;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: arizona: make array mclk_name static, shrinks object size
  2018-09-04 14:15 [PATCH] mfd: arizona: make array mclk_name static, shrinks object size Colin King
@ 2018-09-05  9:15 ` Charles Keepax
  2018-09-11 14:00 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2018-09-05  9:15 UTC (permalink / raw)
  To: Colin King; +Cc: Lee Jones, patches, kernel-janitors, linux-kernel

On Tue, Sep 04, 2018 at 03:15:53PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array mclk_name on the stack but instead make it
> static. Makes the object code smaller by 23 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>   38050	  11604	     64	  49718	   c236	linux/drivers/mfd/arizona-core.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>   38027	  11604	     64	  49695	   c21f	linux/drivers/mfd/arizona-core.o
> 
> (gcc version 8.2.0 x86_64)
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: arizona: make array mclk_name static, shrinks object size
  2018-09-04 14:15 [PATCH] mfd: arizona: make array mclk_name static, shrinks object size Colin King
  2018-09-05  9:15 ` Charles Keepax
@ 2018-09-11 14:00 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2018-09-11 14:00 UTC (permalink / raw)
  To: Colin King; +Cc: patches, kernel-janitors, linux-kernel

On Tue, 04 Sep 2018, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array mclk_name on the stack but instead make it
> static. Makes the object code smaller by 23 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>   38050	  11604	     64	  49718	   c236	linux/drivers/mfd/arizona-core.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>   38027	  11604	     64	  49695	   c21f	linux/drivers/mfd/arizona-core.o
> 
> (gcc version 8.2.0 x86_64)
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/mfd/arizona-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-11 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 14:15 [PATCH] mfd: arizona: make array mclk_name static, shrinks object size Colin King
2018-09-05  9:15 ` Charles Keepax
2018-09-11 14:00 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).