]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: phy: Constify struct mdio_device_id
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 12 Jan 2025 14:14:50 +0000 (15:14 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 Jan 2025 23:01:32 +0000 (15:01 -0800)
'struct mdio_device_id' is not modified in these drivers.

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

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  27014   12792       0   39806    9b7e drivers/net/phy/broadcom.o

After:
=====
   text    data     bss     dec     hex filename
  27206   12600       0   39806    9b7e drivers/net/phy/broadcom.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/403c381b7d9156b67ad68ffc44b8eee70c5e86a9.1736691226.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
56 files changed:
drivers/net/phy/adin.c
drivers/net/phy/adin1100.c
drivers/net/phy/air_en8811h.c
drivers/net/phy/amd.c
drivers/net/phy/aquantia/aquantia_main.c
drivers/net/phy/ax88796b.c
drivers/net/phy/bcm-cygnus.c
drivers/net/phy/bcm54140.c
drivers/net/phy/bcm63xx.c
drivers/net/phy/bcm7xxx.c
drivers/net/phy/bcm84881.c
drivers/net/phy/broadcom.c
drivers/net/phy/cicada.c
drivers/net/phy/cortina.c
drivers/net/phy/davicom.c
drivers/net/phy/dp83640.c
drivers/net/phy/dp83822.c
drivers/net/phy/dp83848.c
drivers/net/phy/dp83867.c
drivers/net/phy/dp83869.c
drivers/net/phy/dp83tc811.c
drivers/net/phy/dp83td510.c
drivers/net/phy/dp83tg720.c
drivers/net/phy/et1011c.c
drivers/net/phy/icplus.c
drivers/net/phy/intel-xway.c
drivers/net/phy/lxt.c
drivers/net/phy/marvell-88q2xxx.c
drivers/net/phy/marvell-88x2222.c
drivers/net/phy/marvell.c
drivers/net/phy/marvell10g.c
drivers/net/phy/mediatek/mtk-ge-soc.c
drivers/net/phy/mediatek/mtk-ge.c
drivers/net/phy/meson-gxl.c
drivers/net/phy/micrel.c
drivers/net/phy/microchip.c
drivers/net/phy/microchip_t1.c
drivers/net/phy/microchip_t1s.c
drivers/net/phy/mscc/mscc_main.c
drivers/net/phy/mxl-gpy.c
drivers/net/phy/national.c
drivers/net/phy/ncn26000.c
drivers/net/phy/nxp-c45-tja11xx.c
drivers/net/phy/nxp-cbtx.c
drivers/net/phy/nxp-tja11xx.c
drivers/net/phy/qcom/at803x.c
drivers/net/phy/qcom/qca807x.c
drivers/net/phy/qcom/qca808x.c
drivers/net/phy/qcom/qca83xx.c
drivers/net/phy/qsemi.c
drivers/net/phy/rockchip.c
drivers/net/phy/smsc.c
drivers/net/phy/ste10Xp.c
drivers/net/phy/teranetics.c
drivers/net/phy/uPD60620.c
drivers/net/phy/vitesse.c

index a2a862bae2ed1e1c75a75c58f8a598ddf6a57445..7fa713ca8d45252ba1e300eb89e75a1d06b1473f 100644 (file)
@@ -1038,7 +1038,7 @@ static struct phy_driver adin_driver[] = {
 
 module_phy_driver(adin_driver);
 
-static struct mdio_device_id __maybe_unused adin_tbl[] = {
+static const struct mdio_device_id __maybe_unused adin_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_ADIN1200) },
        { PHY_ID_MATCH_MODEL(PHY_ID_ADIN1300) },
        { }
index 85f910e2d4fb2ba5e005cef56dfbde18b075269a..6bb469429b9d051f8f4f0d959e2cd61947eb2826 100644 (file)
@@ -340,7 +340,7 @@ static struct phy_driver adin_driver[] = {
 
 module_phy_driver(adin_driver);
 
-static struct mdio_device_id __maybe_unused adin_tbl[] = {
+static const struct mdio_device_id __maybe_unused adin_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_ADIN1100) },
        { PHY_ID_MATCH_MODEL(PHY_ID_ADIN1110) },
        { PHY_ID_MATCH_MODEL(PHY_ID_ADIN2111) },
index 8d076b9609fdbd04e797684dfb7eada5c7ae41d9..e9fd24cb727092c922058820bc2c1599ca4b13ec 100644 (file)
@@ -1075,7 +1075,7 @@ static struct phy_driver en8811h_driver[] = {
 
 module_phy_driver(en8811h_driver);
 
-static struct mdio_device_id __maybe_unused en8811h_tbl[] = {
+static const struct mdio_device_id __maybe_unused en8811h_tbl[] = {
        { PHY_ID_MATCH_MODEL(EN8811H_PHY_ID) },
        { }
 };
index 930b15fa6ce951d86a6349828fa8732f0f3a12ee..75b5fe65500aa9230fc929a8cdb42079565eba6d 100644 (file)
@@ -111,7 +111,7 @@ static struct phy_driver am79c_drivers[] = {
 
 module_phy_driver(am79c_drivers);
 
-static struct mdio_device_id __maybe_unused amd_tbl[] = {
+static const struct mdio_device_id __maybe_unused amd_tbl[] = {
        { PHY_ID_AC101L, 0xfffffff0 },
        { PHY_ID_AM79C874, 0xfffffff0 },
        { }
index bb56a66d2a48fab35eac87f75ad030a3ca6d9ec0..e42ace4e682aacf56199b7fdb9613d20f240fa27 100644 (file)
@@ -1200,7 +1200,7 @@ static struct phy_driver aqr_driver[] = {
 
 module_phy_driver(aqr_driver);
 
-static struct mdio_device_id __maybe_unused aqr_tbl[] = {
+static const struct mdio_device_id __maybe_unused aqr_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_AQ1202) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQ2104) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
index eb74a8cf8df1c077670c3d84c37f7c872e37ff4b..694df1401aa2aaf96fcffc1ce529a7ef505933f4 100644 (file)
@@ -121,7 +121,7 @@ static struct phy_driver asix_driver[] = {
 
 module_phy_driver(asix_driver);
 
-static struct mdio_device_id __maybe_unused asix_tbl[] = {
+static const struct mdio_device_id __maybe_unused asix_tbl[] = {
        { PHY_ID_MATCH_EXACT(PHY_ID_ASIX_AX88772A) },
        { PHY_ID_MATCH_EXACT(PHY_ID_ASIX_AX88772C) },
        { PHY_ID_ASIX_AX88796B, 0xfffffff0 },
index da8f7cb41b44555f91415946adb9b3b49a058058..15cbef8202bc5fd7a34e94ef8ac2d0a9b9fd504a 100644 (file)
@@ -278,7 +278,7 @@ static struct phy_driver bcm_cygnus_phy_driver[] = {
 }
 };
 
-static struct mdio_device_id __maybe_unused bcm_cygnus_phy_tbl[] = {
+static const struct mdio_device_id __maybe_unused bcm_cygnus_phy_tbl[] = {
        { PHY_ID_BCM_CYGNUS, 0xfffffff0, },
        { PHY_ID_BCM_OMEGA, 0xfffffff0, },
        { }
index 2eea3d09b1e6f8f1a74caf0f69ab2fecd0d19e7a..7969345f6b355012f284c83b7ce721889f7e2ee1 100644 (file)
@@ -883,7 +883,7 @@ static struct phy_driver bcm54140_drivers[] = {
 };
 module_phy_driver(bcm54140_drivers);
 
-static struct mdio_device_id __maybe_unused bcm54140_tbl[] = {
+static const struct mdio_device_id __maybe_unused bcm54140_tbl[] = {
        { PHY_ID_BCM54140, BCM54140_PHY_ID_MASK },
        { }
 };
index 0eb33be824f1b822faf5b9eb9d382cdfec6ee3a2..b46a736a3130ce18db5977278c37ca3571c1c527 100644 (file)
@@ -93,7 +93,7 @@ static struct phy_driver bcm63xx_driver[] = {
 
 module_phy_driver(bcm63xx_driver);
 
-static struct mdio_device_id __maybe_unused bcm63xx_tbl[] = {
+static const struct mdio_device_id __maybe_unused bcm63xx_tbl[] = {
        { 0x00406000, 0xfffffc00 },
        { 0x002bdc00, 0xfffffc00 },
        { }
index 97638ba7ae851d693710e2b508b658bb81ad2c28..00e8fa14aa773a932f3dab0155a5c4fcb46dbe70 100644 (file)
@@ -929,7 +929,7 @@ static struct phy_driver bcm7xxx_driver[] = {
        BCM7XXX_16NM_EPHY(PHY_ID_BCM7712, "Broadcom BCM7712"),
 };
 
-static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
+static const struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
        { PHY_ID_BCM72113, 0xfffffff0 },
        { PHY_ID_BCM72116, 0xfffffff0, },
        { PHY_ID_BCM72165, 0xfffffff0, },
index 47405bded67798c9cbb728085f1840117a412cf3..d7f7cc44c532f466b8cc80750c0c620441d1d9b2 100644 (file)
@@ -262,7 +262,7 @@ static struct phy_driver bcm84881_drivers[] = {
 module_phy_driver(bcm84881_drivers);
 
 /* FIXME: module auto-loading for Clause 45 PHYs seems non-functional */
-static struct mdio_device_id __maybe_unused bcm84881_tbl[] = {
+static const struct mdio_device_id __maybe_unused bcm84881_tbl[] = {
        { 0xae025150, 0xfffffff0 },
        { },
 };
index ddded162c44c134836662f2940454e90fed32ec0..22edb7e4c1a1f9a9b90c2d6094fc4418c581cc5e 100644 (file)
@@ -1717,7 +1717,7 @@ static struct phy_driver broadcom_drivers[] = {
 
 module_phy_driver(broadcom_drivers);
 
-static struct mdio_device_id __maybe_unused broadcom_tbl[] = {
+static const struct mdio_device_id __maybe_unused broadcom_tbl[] = {
        { PHY_ID_BCM5411, 0xfffffff0 },
        { PHY_ID_BCM5421, 0xfffffff0 },
        { PHY_ID_BCM54210E, 0xfffffff0 },
index ef5f412e101f49774f6fe96fee33301ad41d83a9..d87cf8b94cf855f2d8c6ec6a8a89dc2b3cddf1c9 100644 (file)
@@ -145,7 +145,7 @@ static struct phy_driver cis820x_driver[] = {
 
 module_phy_driver(cis820x_driver);
 
-static struct mdio_device_id __maybe_unused cicada_tbl[] = {
+static const struct mdio_device_id __maybe_unused cicada_tbl[] = {
        { 0x000fc410, 0x000ffff0 },
        { 0x000fc440, 0x000fffc0 },
        { }
index 40514a94e6ff688586eac6893222b9895502cce3..3b65f37f1c5704d5b6a2099194d02acc77482aae 100644 (file)
@@ -87,7 +87,7 @@ static struct phy_driver cortina_driver[] = {
 
 module_phy_driver(cortina_driver);
 
-static struct mdio_device_id __maybe_unused cortina_tbl[] = {
+static const struct mdio_device_id __maybe_unused cortina_tbl[] = {
        { PHY_ID_CS4340, 0xffffffff},
        {},
 };
index 4ac4bce1bf323e923304e27528ad0d0f1e92415b..fa3692508f16e33ac07fc67ee3ac0b2c2ea8aac0 100644 (file)
@@ -209,7 +209,7 @@ static struct phy_driver dm91xx_driver[] = {
 
 module_phy_driver(dm91xx_driver);
 
-static struct mdio_device_id __maybe_unused davicom_tbl[] = {
+static const struct mdio_device_id __maybe_unused davicom_tbl[] = {
        { 0x0181b880, 0x0ffffff0 },
        { 0x0181b8b0, 0x0ffffff0 },
        { 0x0181b8a0, 0x0ffffff0 },
index 075d2beea716b230afbadbec34e3798d8de2860c..85e231451093f0ed1e7cec3341889f37f8d8935a 100644 (file)
@@ -1548,7 +1548,7 @@ MODULE_LICENSE("GPL");
 module_init(dp83640_init);
 module_exit(dp83640_exit);
 
-static struct mdio_device_id __maybe_unused dp83640_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83640_tbl[] = {
        { DP83640_PHY_ID, 0xfffffff0 },
        { }
 };
index f89e742281d1c8692092e990f32483a122f54430..6599feca1967d705331d6e354205a2485ea962f2 100644 (file)
@@ -1149,7 +1149,7 @@ static struct phy_driver dp83822_driver[] = {
 };
 module_phy_driver(dp83822_driver);
 
-static struct mdio_device_id __maybe_unused dp83822_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83822_tbl[] = {
        { DP83822_PHY_ID, 0xfffffff0 },
        { DP83825I_PHY_ID, 0xfffffff0 },
        { DP83826C_PHY_ID, 0xfffffff0 },
index 351411f0aa6f471d47112fcbdadf5aa4139fa895..d88b1999d59629041a33f7d45d60294884bc7904 100644 (file)
@@ -123,7 +123,7 @@ static int dp83848_config_init(struct phy_device *phydev)
        return 0;
 }
 
-static struct mdio_device_id __maybe_unused dp83848_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83848_tbl[] = {
        { TI_DP83848C_PHY_ID, 0xfffffff0 },
        { NS_DP83848C_PHY_ID, 0xfffffff0 },
        { TI_DP83620_PHY_ID, 0xfffffff0 },
index 4120385c5a79df951556de231c2429fa04b9e5cb..c1451df430ace1b0db6127e1cd3ef1ab1f115997 100644 (file)
@@ -1210,7 +1210,7 @@ static struct phy_driver dp83867_driver[] = {
 };
 module_phy_driver(dp83867_driver);
 
-static struct mdio_device_id __maybe_unused dp83867_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83867_tbl[] = {
        { DP83867_PHY_ID, 0xfffffff0 },
        { }
 };
index b6b38caf9c0ed0b3ae12a2af7e56754e3ece642f..a62cd838a9eacc9edb0f472470a63079b6b72207 100644 (file)
@@ -928,7 +928,7 @@ static struct phy_driver dp83869_driver[] = {
 };
 module_phy_driver(dp83869_driver);
 
-static struct mdio_device_id __maybe_unused dp83869_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83869_tbl[] = {
        { PHY_ID_MATCH_MODEL(DP83869_PHY_ID) },
        { PHY_ID_MATCH_MODEL(DP83561_PHY_ID) },
        { }
index 7ea32fb77190c47544355d17edaffd8f9d9c7c23..e480c2a0745057ed8c4f643e654a021d327e8c7f 100644 (file)
@@ -403,7 +403,7 @@ static struct phy_driver dp83811_driver[] = {
 };
 module_phy_driver(dp83811_driver);
 
-static struct mdio_device_id __maybe_unused dp83811_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83811_tbl[] = {
        { DP83TC811_PHY_ID, 0xfffffff0 },
        { },
 };
index 1abeacca74416cd26ebebc8df1d9348065f84ec4..a42af9c168ec59548a18ea3a1ccb032eda55ef61 100644 (file)
@@ -717,7 +717,7 @@ static struct phy_driver dp83td510_driver[] = {
 } };
 module_phy_driver(dp83td510_driver);
 
-static struct mdio_device_id __maybe_unused dp83td510_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83td510_tbl[] = {
        { PHY_ID_MATCH_MODEL(DP83TD510E_PHY_ID) },
        { }
 };
index 4ea752131b8ca3d04c7e7054bd2fadf28301d39b..050f4537d140f04f4d8984b7bca3b3f49cba02d9 100644 (file)
@@ -522,7 +522,7 @@ static struct phy_driver dp83tg720_driver[] = {
 } };
 module_phy_driver(dp83tg720_driver);
 
-static struct mdio_device_id __maybe_unused dp83tg720_tbl[] = {
+static const struct mdio_device_id __maybe_unused dp83tg720_tbl[] = {
        { PHY_ID_MATCH_MODEL(DP83TG720S_PHY_ID) },
        { }
 };
index be1b71d7cab7ee3a0bfe43d72d2a785b6acd35b4..6cd8d77586fda02d4eec7ddf5f8d8452f964cde6 100644 (file)
@@ -94,7 +94,7 @@ static struct phy_driver et1011c_driver[] = { {
 
 module_phy_driver(et1011c_driver);
 
-static struct mdio_device_id __maybe_unused et1011c_tbl[] = {
+static const struct mdio_device_id __maybe_unused et1011c_tbl[] = {
        { 0x0282f014, 0xfffffff0 },
        { }
 };
index ee438b71a0b455c4d95bc509209ba24dd75a5af7..bbcc7d2b54cd785724a90a8437d38728a7493c38 100644 (file)
@@ -623,7 +623,7 @@ static struct phy_driver icplus_driver[] = {
 
 module_phy_driver(icplus_driver);
 
-static struct mdio_device_id __maybe_unused icplus_tbl[] = {
+static const struct mdio_device_id __maybe_unused icplus_tbl[] = {
        { PHY_ID_MATCH_MODEL(IP175C_PHY_ID) },
        { PHY_ID_MATCH_MODEL(IP1001_PHY_ID) },
        { PHY_ID_MATCH_EXACT(IP101A_PHY_ID) },
index e6ed2413e514c72985780b4e60c3cd92cdfee549..a44771e8acdcfe26af69bdcf9bd89325f98b2063 100644 (file)
@@ -691,7 +691,7 @@ static struct phy_driver xway_gphy[] = {
 };
 module_phy_driver(xway_gphy);
 
-static struct mdio_device_id __maybe_unused xway_gphy_tbl[] = {
+static const struct mdio_device_id __maybe_unused xway_gphy_tbl[] = {
        { PHY_ID_PHY11G_1_3, 0xffffffff },
        { PHY_ID_PHY22F_1_3, 0xffffffff },
        { PHY_ID_PHY11G_1_4, 0xffffffff },
index e3bf827b7959d4d9a8e997856d222969467eb058..5251a61c8b0f9f90ad716d4ffc6d6de5ce8699e3 100644 (file)
@@ -348,7 +348,7 @@ static struct phy_driver lxt97x_driver[] = {
 
 module_phy_driver(lxt97x_driver);
 
-static struct mdio_device_id __maybe_unused lxt_tbl[] = {
+static const struct mdio_device_id __maybe_unused lxt_tbl[] = {
        { 0x78100000, 0xfffffff0 },
        { 0x001378e0, 0xfffffff0 },
        { 0x00137a10, 0xfffffff0 },
index 5107f58338aff4ed6cfea4d91e37282d9bb60ba5..4494b3e39ce2b672efe49d53d7021b765def6aa6 100644 (file)
@@ -939,7 +939,7 @@ static struct phy_driver mv88q2xxx_driver[] = {
 
 module_phy_driver(mv88q2xxx_driver);
 
-static struct mdio_device_id __maybe_unused mv88q2xxx_tbl[] = {
+static const struct mdio_device_id __maybe_unused mv88q2xxx_tbl[] = {
        { MARVELL_PHY_ID_88Q2110, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88Q2220, MARVELL_PHY_ID_MASK },
        { /*sentinel*/ }
index 0b777cdd7078b14f3e12731f3956f1f1492d3dc7..fad2f54c1eac22dec4f095651567d1323a64ced2 100644 (file)
@@ -613,7 +613,7 @@ static struct phy_driver mv2222_drivers[] = {
 };
 module_phy_driver(mv2222_drivers);
 
-static struct mdio_device_id __maybe_unused mv2222_tbl[] = {
+static const struct mdio_device_id __maybe_unused mv2222_tbl[] = {
        { MARVELL_PHY_ID_88X2222, MARVELL_PHY_ID_MASK },
        { }
 };
index ffe223ad9e5f1883d9d2a1f4f06dc3fe06391703..44e1927de4997c6f40aaa03af89c401035aef1f1 100644 (file)
@@ -4189,7 +4189,7 @@ static struct phy_driver marvell_drivers[] = {
 
 module_phy_driver(marvell_drivers);
 
-static struct mdio_device_id __maybe_unused marvell_tbl[] = {
+static const struct mdio_device_id __maybe_unused marvell_tbl[] = {
        { MARVELL_PHY_ID_88E1101, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E3082, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1112, MARVELL_PHY_ID_MASK },
index 6642eb642d4bdd3880ddd7fdbc3471bc2c78e5ea..623bdb8466b86020e4176ddbe2ce8ce2e4ccd520 100644 (file)
@@ -1484,7 +1484,7 @@ static struct phy_driver mv3310_drivers[] = {
 
 module_phy_driver(mv3310_drivers);
 
-static struct mdio_device_id __maybe_unused mv3310_tbl[] = {
+static const struct mdio_device_id __maybe_unused mv3310_tbl[] = {
        { MARVELL_PHY_ID_88X3310, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E2110, MARVELL_PHY_ID_MASK },
        { },
index 38dc898eaf7bf0551bec645a9b3fac488acfbb15..bdf99b3270293decbb09c53bb0bbe6aa3a7fba18 100644 (file)
@@ -1356,7 +1356,7 @@ static struct phy_driver mtk_socphy_driver[] = {
 
 module_phy_driver(mtk_socphy_driver);
 
-static struct mdio_device_id __maybe_unused mtk_socphy_tbl[] = {
+static const struct mdio_device_id __maybe_unused mtk_socphy_tbl[] = {
        { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7981) },
        { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7988) },
        { }
index ed2617bc20f493ac9d36cbbf12bc4a3145618327..b517ca8573e76127586b9721b2a2a29453bda14e 100644 (file)
@@ -93,7 +93,7 @@ static struct phy_driver mtk_gephy_driver[] = {
 
 module_phy_driver(mtk_gephy_driver);
 
-static struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {
+static const struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {
        { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },
        { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },
        { }
index bb9b33b6bce24cf8318f7121946a4ecccde28ed0..962ebbbc13482c916ca154c246ce6226888754ef 100644 (file)
@@ -221,7 +221,7 @@ static struct phy_driver meson_gxl_phy[] = {
        },
 };
 
-static struct mdio_device_id __maybe_unused meson_gxl_tbl[] = {
+static const struct mdio_device_id __maybe_unused meson_gxl_tbl[] = {
        { PHY_ID_MATCH_VENDOR(0x01814400) },
        { PHY_ID_MATCH_VENDOR(0x01803301) },
        { }
index 0fd1cb676cd5f40871cdfbdd172ef2695d4ecff2..9c0b1c229af64a7a2973ecb43882ae590d3b09fc 100644 (file)
@@ -5689,7 +5689,7 @@ MODULE_DESCRIPTION("Micrel PHY driver");
 MODULE_AUTHOR("David J. Choi");
 MODULE_LICENSE("GPL");
 
-static struct mdio_device_id __maybe_unused micrel_tbl[] = {
+static const struct mdio_device_id __maybe_unused micrel_tbl[] = {
        { PHY_ID_KSZ9021, 0x000ffffe },
        { PHY_ID_KSZ9031, MICREL_PHY_ID_MASK },
        { PHY_ID_KSZ9131, MICREL_PHY_ID_MASK },
index 691969a4910f2b4821d4ed53bd1458e7c4834339..0e17cc458efdc7039e356e75fffa3425fb924e72 100644 (file)
@@ -548,7 +548,7 @@ static struct phy_driver microchip_phy_driver[] = {
 
 module_phy_driver(microchip_phy_driver);
 
-static struct mdio_device_id __maybe_unused microchip_tbl[] = {
+static const struct mdio_device_id __maybe_unused microchip_tbl[] = {
        { 0x0007c132, 0xfffffff2 },
        { PHY_ID_MATCH_MODEL(PHY_ID_LAN937X_TX) },
        { }
index 73f28463bc356d4eebfe7c3751a620596a37aa62..76e5b01832f38d6a260a59d45885bab1bd61cb5e 100644 (file)
@@ -2154,7 +2154,7 @@ static struct phy_driver microchip_t1_phy_driver[] = {
 
 module_phy_driver(microchip_t1_phy_driver);
 
-static struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
+static const struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX) },
        { PHY_ID_MATCH_MODEL(PHY_ID_LAN937X) },
        { PHY_ID_MATCH_MODEL(PHY_ID_LAN887X) },
index 75d291154b4cdb34cadfcccb801b47347a386be8..e50a0c102a8627b7bfa8f6152ff15968dbec7800 100644 (file)
@@ -497,7 +497,7 @@ static struct phy_driver microchip_t1s_driver[] = {
 
 module_phy_driver(microchip_t1s_driver);
 
-static struct mdio_device_id __maybe_unused tbl[] = {
+static const struct mdio_device_id __maybe_unused tbl[] = {
        { PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVB1) },
        { PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVC1) },
        { PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVC2) },
index bee381200ab85c6d6b69bb98e0df1dc59af21c14..19cf12ee8990fffef1a993b47a928f48341070f9 100644 (file)
@@ -2699,7 +2699,7 @@ static struct phy_driver vsc85xx_driver[] = {
 
 module_phy_driver(vsc85xx_driver);
 
-static struct mdio_device_id __maybe_unused vsc85xx_tbl[] = {
+static const struct mdio_device_id __maybe_unused vsc85xx_tbl[] = {
        { PHY_ID_MATCH_VENDOR(PHY_VENDOR_MSCC) },
        { }
 };
index a8ccf257c109439dcd52a39b80dcad4815fb9bd3..94d9cb727121a3b581be257da23596501645fc83 100644 (file)
@@ -1274,7 +1274,7 @@ static struct phy_driver gpy_drivers[] = {
 };
 module_phy_driver(gpy_drivers);
 
-static struct mdio_device_id __maybe_unused gpy_tbl[] = {
+static const struct mdio_device_id __maybe_unused gpy_tbl[] = {
        {PHY_ID_MATCH_MODEL(PHY_ID_GPY2xx)},
        {PHY_ID_GPY115B, PHY_ID_GPYx15B_MASK},
        {PHY_ID_MATCH_MODEL(PHY_ID_GPY115C)},
index 9ae9cc6b23c29bf9ef7d2826482678b0bf3fc6e5..7f3ff322892e74a682947b5410a2ed4add5441a7 100644 (file)
@@ -173,7 +173,7 @@ MODULE_DESCRIPTION("NatSemi PHY driver");
 MODULE_AUTHOR("Stuart Menefy");
 MODULE_LICENSE("GPL");
 
-static struct mdio_device_id __maybe_unused ns_tbl[] = {
+static const struct mdio_device_id __maybe_unused ns_tbl[] = {
        { DP83865_PHY_ID, 0xfffffff0 },
        { }
 };
index 5680584f659e7c5ef67baf4ab31ee13463c8c61f..cabdd83c614f0d69b347ed10664a8fdcd03f5229 100644 (file)
@@ -159,7 +159,7 @@ static struct phy_driver ncn26000_driver[] = {
 
 module_phy_driver(ncn26000_driver);
 
-static struct mdio_device_id __maybe_unused ncn26000_tbl[] = {
+static const struct mdio_device_id __maybe_unused ncn26000_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_NCN26000) },
        { }
 };
index ade544bc007d25278b74643e7f6f2183c4c8b124..323717a4821fc9e5842386d023bc5d9264594304 100644 (file)
@@ -2008,7 +2008,7 @@ static struct phy_driver nxp_c45_driver[] = {
 
 module_phy_driver(nxp_c45_driver);
 
-static struct mdio_device_id __maybe_unused nxp_c45_tbl[] = {
+static const struct mdio_device_id __maybe_unused nxp_c45_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_TJA_1103) },
        { PHY_ID_MATCH_MODEL(PHY_ID_TJA_1120) },
        { /*sentinel*/ },
index 3d25491043a3c13d641848c90c06913b7c49a838..3286fcb4f47e10b23f93d57f5ee3514aa8b48b97 100644 (file)
@@ -215,7 +215,7 @@ static struct phy_driver cbtx_driver[] = {
 
 module_phy_driver(cbtx_driver);
 
-static struct mdio_device_id __maybe_unused cbtx_tbl[] = {
+static const struct mdio_device_id __maybe_unused cbtx_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_CBTX_SJA1110) },
        { },
 };
index 2c263ae44b4f311e7f80f88520c0ca70f71686ab..ed7fa26bac8e83f43d6d656e2e2812e501111eb0 100644 (file)
@@ -888,7 +888,7 @@ static struct phy_driver tja11xx_driver[] = {
 
 module_phy_driver(tja11xx_driver);
 
-static struct mdio_device_id __maybe_unused tja11xx_tbl[] = {
+static const struct mdio_device_id __maybe_unused tja11xx_tbl[] = {
        { PHY_ID_MATCH_MODEL(PHY_ID_TJA1100) },
        { PHY_ID_MATCH_MODEL(PHY_ID_TJA1101) },
        { PHY_ID_MATCH_MODEL(PHY_ID_TJA1102) },
index 105602581a03368416789bcd07dee38baae05d58..26350b962890b0321153d74758b13d817407d094 100644 (file)
@@ -1098,7 +1098,7 @@ static struct phy_driver at803x_driver[] = {
 
 module_phy_driver(at803x_driver);
 
-static struct mdio_device_id __maybe_unused atheros_tbl[] = {
+static const struct mdio_device_id __maybe_unused atheros_tbl[] = {
        { ATH8030_PHY_ID, AT8030_PHY_ID_MASK },
        { PHY_ID_MATCH_EXACT(ATH8031_PHY_ID) },
        { PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) },
index bd8a51ec0ecd6af50fdca41e0998fad19383eb62..3279de857b47485dd795ddd5f9a066db7758673e 100644 (file)
@@ -828,7 +828,7 @@ static struct phy_driver qca807x_drivers[] = {
 };
 module_phy_driver(qca807x_drivers);
 
-static struct mdio_device_id __maybe_unused qca807x_tbl[] = {
+static const struct mdio_device_id __maybe_unused qca807x_tbl[] = {
        { PHY_ID_MATCH_EXACT(PHY_ID_QCA8072) },
        { PHY_ID_MATCH_EXACT(PHY_ID_QCA8075) },
        { }
index 5048304ccc9e858130109733597c113c1338d03c..71498c518f0febde2deda7a67d1bf21ec79418f4 100644 (file)
@@ -655,7 +655,7 @@ static struct phy_driver qca808x_driver[] = {
 
 module_phy_driver(qca808x_driver);
 
-static struct mdio_device_id __maybe_unused qca808x_tbl[] = {
+static const struct mdio_device_id __maybe_unused qca808x_tbl[] = {
        { PHY_ID_MATCH_EXACT(QCA8081_PHY_ID) },
        { }
 };
index 7a5039920b9f4c75e6a17d58a8a97c9f24717267..bc70ed8efd86a9f5a2b91875242d90b9dd14655d 100644 (file)
@@ -259,7 +259,7 @@ static struct phy_driver qca83xx_driver[] = {
 
 module_phy_driver(qca83xx_driver);
 
-static struct mdio_device_id __maybe_unused qca83xx_tbl[] = {
+static const struct mdio_device_id __maybe_unused qca83xx_tbl[] = {
        { PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) },
        { PHY_ID_MATCH_EXACT(QCA8327_A_PHY_ID) },
        { PHY_ID_MATCH_EXACT(QCA8327_B_PHY_ID) },
index 30d15f7c9b0316f3a11c83c190e1ff60e5bf795c..7b70ba6cab66d5bc10352e429843f25ebee02d8e 100644 (file)
@@ -155,7 +155,7 @@ static struct phy_driver qs6612_driver[] = { {
 
 module_phy_driver(qs6612_driver);
 
-static struct mdio_device_id __maybe_unused qs6612_tbl[] = {
+static const struct mdio_device_id __maybe_unused qs6612_tbl[] = {
        { 0x00181440, 0xfffffff0 },
        { }
 };
index bb13e75183eef322f809a1227abab0229750bb9a..b338f385e15ad2d2a71b9523533cce7c834c4b3e 100644 (file)
@@ -188,7 +188,7 @@ static struct phy_driver rockchip_phy_driver[] = {
 
 module_phy_driver(rockchip_phy_driver);
 
-static struct mdio_device_id __maybe_unused rockchip_phy_tbl[] = {
+static const struct mdio_device_id __maybe_unused rockchip_phy_tbl[] = {
        { INTERNAL_EPHY_ID, 0xfffffff0 },
        { }
 };
index e1853599d9baaea1473013052359996d17bd9c95..31463b9e5697f3ab61ebe4e6b333ee8b42b9f591 100644 (file)
@@ -838,7 +838,7 @@ MODULE_DESCRIPTION("SMSC PHY driver");
 MODULE_AUTHOR("Herbert Valerio Riedel");
 MODULE_LICENSE("GPL");
 
-static struct mdio_device_id __maybe_unused smsc_tbl[] = {
+static const struct mdio_device_id __maybe_unused smsc_tbl[] = {
        { 0x0007c0a0, 0xfffffff0 },
        { 0x0007c0b0, 0xfffffff0 },
        { 0x0007c0c0, 0xfffffff0 },
index 309e4c3496c45046e921851a3e1e92cafbf1aeb8..d4835d4c50e08eb6b6a8809e459560ebe9be83c9 100644 (file)
@@ -124,7 +124,7 @@ static struct phy_driver ste10xp_pdriver[] = {
 
 module_phy_driver(ste10xp_pdriver);
 
-static struct mdio_device_id __maybe_unused ste10Xp_tbl[] = {
+static const struct mdio_device_id __maybe_unused ste10Xp_tbl[] = {
        { STE101P_PHY_ID, 0xfffffff0 },
        { STE100P_PHY_ID, 0xffffffff },
        { }
index 8057ea8dbc218476a2de3dee204a29cf529af1bb..752d4bf7bb998cd407c8ef14ca6ed7944d768d44 100644 (file)
@@ -87,7 +87,7 @@ static struct phy_driver teranetics_driver[] = {
 
 module_phy_driver(teranetics_driver);
 
-static struct mdio_device_id __maybe_unused teranetics_tbl[] = {
+static const struct mdio_device_id __maybe_unused teranetics_tbl[] = {
        { PHY_ID_TN2020, 0xffffffff },
        { }
 };
index 38834347a427eb651eeeee05346b0bd5120fce40..900cb756c36603e13a9e8e11b8a4d6b3f8ecbeb1 100644 (file)
@@ -90,7 +90,7 @@ static struct phy_driver upd60620_driver[1] = { {
 
 module_phy_driver(upd60620_driver);
 
-static struct mdio_device_id __maybe_unused upd60620_tbl[] = {
+static const struct mdio_device_id __maybe_unused upd60620_tbl[] = {
        { UPD60620_PHY_ID, 0xfffffffe },
        { }
 };
index 2377179de017b54d4af07a9c19e4154876e49603..b1b7bbba284e6f78eba3741941234fb81c679aa8 100644 (file)
@@ -674,7 +674,7 @@ static struct phy_driver vsc82xx_driver[] = {
 
 module_phy_driver(vsc82xx_driver);
 
-static struct mdio_device_id __maybe_unused vitesse_tbl[] = {
+static const struct mdio_device_id __maybe_unused vitesse_tbl[] = {
        { PHY_ID_VSC8234, 0x000ffff0 },
        { PHY_ID_VSC8244, 0x000fffc0 },
        { PHY_ID_VSC8572, 0x000ffff0 },