summaryrefslogtreecommitdiff
path: root/drivers/net/phy/dp83822.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2025-01-12 15:14:50 +0100
committerJakub Kicinski <kuba@kernel.org>2025-01-14 15:01:32 -0800
commitb01b59a4fa87831b8504f1e8fc553ce599e7362d (patch)
treedd2b1b7c9438b9b282dcfcf6ee01957f9235aa45 /drivers/net/phy/dp83822.c
parent721167200493d9a62300e421a9f7f3f020b2e3d0 (diff)
downloadlwn-b01b59a4fa87831b8504f1e8fc553ce599e7362d.tar.gz
lwn-b01b59a4fa87831b8504f1e8fc553ce599e7362d.zip
net: phy: Constify struct mdio_device_id
'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>
Diffstat (limited to 'drivers/net/phy/dp83822.c')
-rw-r--r--drivers/net/phy/dp83822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
index f89e742281d1..6599feca1967 100644
--- a/drivers/net/phy/dp83822.c
+++ b/drivers/net/phy/dp83822.c
@@ -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 },