All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size
@ 2017-08-31 13:57 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2017-08-31 13:57 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, netdev; +Cc: kernel-janitors, linux-kernel

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

Don't populate the array bcm7xxx_suspend_cfg A on the stack, instead
make it static.  Makes the object code smaller by over 300 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
   6351	   8146	      0	  14497	   38a1	drivers/net/phy/bcm7xxx.o

After:
   text	   data	    bss	    dec	    hex	filename
   5986	   8210	      0	  14196	   3774	drivers/net/phy/bcm7xxx.o

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

diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index caa9f6e17f34..8b33f688ac8a 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -511,7 +511,7 @@ static int bcm7xxx_config_init(struct phy_device *phydev)
 static int bcm7xxx_suspend(struct phy_device *phydev)
 {
 	int ret;
-	const struct bcm7xxx_regs {
+	static const struct bcm7xxx_regs {
 		int reg;
 		u16 value;
 	} bcm7xxx_suspend_cfg[] = {
-- 
2.14.1

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

* [PATCH] net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size
@ 2017-08-31 13:57 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2017-08-31 13:57 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, netdev; +Cc: kernel-janitors, linux-kernel

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

Don't populate the array bcm7xxx_suspend_cfg A on the stack, instead
make it static.  Makes the object code smaller by over 300 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
   6351	   8146	      0	  14497	   38a1	drivers/net/phy/bcm7xxx.o

After:
   text	   data	    bss	    dec	    hex	filename
   5986	   8210	      0	  14196	   3774	drivers/net/phy/bcm7xxx.o

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

diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index caa9f6e17f34..8b33f688ac8a 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -511,7 +511,7 @@ static int bcm7xxx_config_init(struct phy_device *phydev)
 static int bcm7xxx_suspend(struct phy_device *phydev)
 {
 	int ret;
-	const struct bcm7xxx_regs {
+	static const struct bcm7xxx_regs {
 		int reg;
 		u16 value;
 	} bcm7xxx_suspend_cfg[] = {
-- 
2.14.1


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

* Re: [PATCH] net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size
  2017-08-31 13:57 ` Colin King
@ 2017-09-02  1:31   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-02  1:31 UTC (permalink / raw)
  To: colin.king; +Cc: andrew, f.fainelli, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Thu, 31 Aug 2017 14:57:15 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array bcm7xxx_suspend_cfg A on the stack, instead
> make it static.  Makes the object code smaller by over 300 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    6351	   8146	      0	  14497	   38a1	drivers/net/phy/bcm7xxx.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    5986	   8210	      0	  14196	   3774	drivers/net/phy/bcm7xxx.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

* Re: [PATCH] net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size
@ 2017-09-02  1:31   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-02  1:31 UTC (permalink / raw)
  To: colin.king; +Cc: andrew, f.fainelli, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Thu, 31 Aug 2017 14:57:15 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array bcm7xxx_suspend_cfg A on the stack, instead
> make it static.  Makes the object code smaller by over 300 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    6351	   8146	      0	  14497	   38a1	drivers/net/phy/bcm7xxx.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    5986	   8210	      0	  14196	   3774	drivers/net/phy/bcm7xxx.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2017-09-02  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 13:57 [PATCH] net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size Colin King
2017-08-31 13:57 ` Colin King
2017-09-02  1:31 ` David Miller
2017-09-02  1:31   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.