]> Git Repo - linux.git/commitdiff
phy: qcom-qmp: make a const array static, makes object smaller
authorColin Ian King <[email protected]>
Thu, 4 Feb 2021 18:03:13 +0000 (18:03 +0000)
committerVinod Koul <[email protected]>
Sat, 6 Feb 2021 10:03:22 +0000 (15:33 +0530)
Don't populate the const array cfg1_settings on the stack but instead make
it static. Makes the object code smaller by 24 bytes:

Before:
   text    data     bss     dec     hex filename
  73585   20240      64   93889   16ec1 drivers/phy/qualcomm/phy-qcom-qmp.o

After:
   text    data     bss     dec     hex filename
  73465   20336      64   93865   16ea9 drivers/phy/qualcomm/phy-qcom-qmp.o

(gcc version 10.2.0)

Signed-off-by: Colin Ian King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
drivers/phy/qualcomm/phy-qcom-qmp.c

index d2c8e1dbee09b912e05bb42cbff88e407b53a15a..9cdebe7f26cb1d3a66134e2065e32979c7dc30f9 100644 (file)
@@ -3545,7 +3545,7 @@ static int qcom_qmp_phy_configure_dp_phy(struct qmp_phy *qphy)
 static int qcom_qmp_dp_phy_calibrate(struct phy *phy)
 {
        struct qmp_phy *qphy = phy_get_drvdata(phy);
-       const u8 cfg1_settings[] = { 0x13, 0x23, 0x1d };
+       static const u8 cfg1_settings[] = { 0x13, 0x23, 0x1d };
        u8 val;
 
        qphy->dp_aux_cfg++;
This page took 0.054835 seconds and 4 git commands to generate.