]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: phy: bcm7xxx: make array bcm7xxx_suspend_cfg static, reduces object code size
authorColin Ian King <colin.king@canonical.com>
Thu, 31 Aug 2017 13:57:15 +0000 (14:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Sep 2017 01:30:50 +0000 (18:30 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/bcm7xxx.c

index caa9f6e17f34cb54277a941a6ca81854ac0cf1ad..8b33f688ac8a123796da15ba9aefd0f11e2a7f6d 100644 (file)
@@ -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[] = {