Commit 86466cbe authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

net: phy: constify netdev->dev_addr references

netdev->dev_addr will become a const soon(ish),
constify the local variables referring to it.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent efd38f75
...@@ -182,7 +182,7 @@ static int dp83867_set_wol(struct phy_device *phydev, ...@@ -182,7 +182,7 @@ static int dp83867_set_wol(struct phy_device *phydev,
{ {
struct net_device *ndev = phydev->attached_dev; struct net_device *ndev = phydev->attached_dev;
u16 val_rxcfg, val_micr; u16 val_rxcfg, val_micr;
u8 *mac; const u8 *mac;
val_rxcfg = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RXFCFG); val_rxcfg = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RXFCFG);
val_micr = phy_read(phydev, MII_DP83867_MICR); val_micr = phy_read(phydev, MII_DP83867_MICR);
...@@ -193,7 +193,7 @@ static int dp83867_set_wol(struct phy_device *phydev, ...@@ -193,7 +193,7 @@ static int dp83867_set_wol(struct phy_device *phydev,
val_micr |= MII_DP83867_MICR_WOL_INT_EN; val_micr |= MII_DP83867_MICR_WOL_INT_EN;
if (wol->wolopts & WAKE_MAGIC) { if (wol->wolopts & WAKE_MAGIC) {
mac = (u8 *)ndev->dev_addr; mac = (const u8 *)ndev->dev_addr;
if (!is_valid_ether_addr(mac)) if (!is_valid_ether_addr(mac))
return -EINVAL; return -EINVAL;
......
...@@ -246,7 +246,7 @@ static int dp83869_set_wol(struct phy_device *phydev, ...@@ -246,7 +246,7 @@ static int dp83869_set_wol(struct phy_device *phydev,
{ {
struct net_device *ndev = phydev->attached_dev; struct net_device *ndev = phydev->attached_dev;
int val_rxcfg, val_micr; int val_rxcfg, val_micr;
u8 *mac; const u8 *mac;
int ret; int ret;
val_rxcfg = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_RXFCFG); val_rxcfg = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_RXFCFG);
...@@ -264,7 +264,7 @@ static int dp83869_set_wol(struct phy_device *phydev, ...@@ -264,7 +264,7 @@ static int dp83869_set_wol(struct phy_device *phydev,
if (wol->wolopts & WAKE_MAGIC || if (wol->wolopts & WAKE_MAGIC ||
wol->wolopts & WAKE_MAGICSECURE) { wol->wolopts & WAKE_MAGICSECURE) {
mac = (u8 *)ndev->dev_addr; mac = (const u8 *)ndev->dev_addr;
if (!is_valid_ether_addr(mac)) if (!is_valid_ether_addr(mac))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment