Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: cadence: Sierra: Constify struct cdns_reg_pairs

'struct cdns_reg_pairs' is not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
60489 4342 16 64847 fd4f drivers/phy/cadence/phy-cadence-sierra.o

After:
=====
text data bss dec hex filename
60521 4310 16 64847 fd4f drivers/phy/cadence/phy-cadence-sierra.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/c57ee8206ebba8c222d7d954335654384072b9ac.1720723132.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Christophe JAILLET and committed by
Vinod Koul
29f33f0b ceb6e043

+3 -3
+3 -3
drivers/phy/cadence/phy-cadence-sierra.c
··· 1544 1544 } 1545 1545 1546 1546 /* SGMII PHY PMA lane configuration */ 1547 - static struct cdns_reg_pairs sgmii_phy_pma_ln_regs[] = { 1547 + static const struct cdns_reg_pairs sgmii_phy_pma_ln_regs[] = { 1548 1548 {0x9010, SIERRA_PHY_PMA_XCVR_CTRL} 1549 1549 }; 1550 1550 ··· 1609 1609 }; 1610 1610 1611 1611 /* QSGMII PHY PMA lane configuration */ 1612 - static struct cdns_reg_pairs qsgmii_phy_pma_ln_regs[] = { 1612 + static const struct cdns_reg_pairs qsgmii_phy_pma_ln_regs[] = { 1613 1613 {0x9010, SIERRA_PHY_PMA_XCVR_CTRL} 1614 1614 }; 1615 1615 ··· 1675 1675 }; 1676 1676 1677 1677 /* PCIE PHY PCS common configuration */ 1678 - static struct cdns_reg_pairs pcie_phy_pcs_cmn_regs[] = { 1678 + static const struct cdns_reg_pairs pcie_phy_pcs_cmn_regs[] = { 1679 1679 {0x0430, SIERRA_PHY_PIPE_CMN_CTRL1} 1680 1680 }; 1681 1681