Skip to content

Commit aa9fbc5

Browse files
Russell King (Oracle)davem330
authored andcommitted
net: mii: constify advertising mask
Constify the advertising mask to linkmode functions that only read from the advertising mask. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4efee05 commit aa9fbc5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/linux/mii.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static inline u32 ethtool_adv_to_mii_adv_t(u32 ethadv)
140140
* settings to phy autonegotiation advertisements for the
141141
* MII_ADVERTISE register.
142142
*/
143-
static inline u32 linkmode_adv_to_mii_adv_t(unsigned long *advertising)
143+
static inline u32 linkmode_adv_to_mii_adv_t(const unsigned long *advertising)
144144
{
145145
u32 result = 0;
146146

@@ -215,7 +215,8 @@ static inline u32 ethtool_adv_to_mii_ctrl1000_t(u32 ethadv)
215215
* settings to phy autonegotiation advertisements for the
216216
* MII_CTRL1000 register when in 1000T mode.
217217
*/
218-
static inline u32 linkmode_adv_to_mii_ctrl1000_t(unsigned long *advertising)
218+
static inline u32
219+
linkmode_adv_to_mii_ctrl1000_t(const unsigned long *advertising)
219220
{
220221
u32 result = 0;
221222

@@ -453,7 +454,7 @@ static inline void mii_ctrl1000_mod_linkmode_adv_t(unsigned long *advertising,
453454
* A small helper function that translates linkmode advertising to LVL
454455
* pause capabilities.
455456
*/
456-
static inline u32 linkmode_adv_to_lcl_adv_t(unsigned long *advertising)
457+
static inline u32 linkmode_adv_to_lcl_adv_t(const unsigned long *advertising)
457458
{
458459
u32 lcl_adv = 0;
459460

0 commit comments

Comments
 (0)