phy: xgene: make array serdes_reg static const, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Fri, 6 Sep 2019 12:49:44 +0000 (13:49 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Wed, 23 Oct 2019 07:50:26 +0000 (13:20 +0530)
Don't populate the array serdes_reg on the stack but instead make it
static const. Makes the object code smaller by 228 bytes.

Before:
   text    data     bss     dec     hex filename
  23875    6232      64   30171    75db drivers/phy/phy-xgene.o

After:
   text    data     bss     dec     hex filename
  23551    6328      64   29943    74f7 drivers/phy/phy-xgene.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-xgene.c

index 3c91894..7a33ec1 100644 (file)
@@ -1342,7 +1342,7 @@ static int xgene_phy_hw_initialize(struct xgene_phy_ctx *ctx,
 static void xgene_phy_force_lat_summer_cal(struct xgene_phy_ctx *ctx, int lane)
 {
        int i;
-       struct {
+       static const struct {
                u32 reg;
                u32 val;
        } serdes_reg[] = {