diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-08-07 15:22:26 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-09 05:59:06 +0300 |
| commit | 09612576046a3cd29bd2b2b88c5813b1dfe96775 (patch) | |
| tree | 73336adb163818ce88fd8c521c67297b32528d92 /include/linux | |
| parent | ceb627435b00fe3bcee5957aeb3e5282a1f06eb6 (diff) | |
| download | linux-09612576046a3cd29bd2b2b88c5813b1dfe96775.tar.xz | |
net: sungem_phy: Constify struct mii_phy_def
'struct mii_phy_def' are not modified in this driver.
Constifying these structures moves some data to a read-only section, so
increase overall security.
While at it fix the checkpatch warning related to this patch (some missing
newlines and spaces around *)
On a x86_64, with allmodconfig:
Before:
======
27709 928 0 28637 6fdd drivers/net/sungem_phy.o
After:
=====
text data bss dec hex filename
28157 476 0 28633 6fd9 drivers/net/sungem_phy.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/54c3b30930f80f4895e6fa2f4234714fdea4ef4e.1723033266.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sungem_phy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sungem_phy.h b/include/linux/sungem_phy.h index c505f30e8b68..eecc7eb63bfb 100644 --- a/include/linux/sungem_phy.h +++ b/include/linux/sungem_phy.h @@ -40,7 +40,7 @@ enum { /* An instance of a PHY, partially borrowed from mii_if_info */ struct mii_phy { - struct mii_phy_def* def; + const struct mii_phy_def *def; u32 advertising; int mii_id; |
