mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-02 05:13:57 +00:00
net: stmmac: Delete dead code for MDIO registration
This code is no longer used, the logging function was changed by commitfbca164776
("net: stmmac: Use the right logging function in stmmac_mdio_register"). It was previously showing information about the type of the IRQ, if it's polled, ignored or a normal interrupt. As we don't want information loss, I have moved this code to phy_attached_print(). Fixes:fbca164776
("net: stmmac: Use the right logging function in stmmac_mdio_register") Signed-off-by: Romain Perier <romain.perier@collabora.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5d621672bc
commit
5e369aefdc
2 changed files with 19 additions and 19 deletions
|
@ -248,9 +248,6 @@ int stmmac_mdio_register(struct net_device *ndev)
|
||||||
found = 0;
|
found = 0;
|
||||||
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||||
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
|
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
|
||||||
int act = 0;
|
|
||||||
char irq_num[4];
|
|
||||||
char *irq_str;
|
|
||||||
|
|
||||||
if (!phydev)
|
if (!phydev)
|
||||||
continue;
|
continue;
|
||||||
|
@ -273,19 +270,6 @@ int stmmac_mdio_register(struct net_device *ndev)
|
||||||
if (priv->plat->phy_addr == -1)
|
if (priv->plat->phy_addr == -1)
|
||||||
priv->plat->phy_addr = addr;
|
priv->plat->phy_addr = addr;
|
||||||
|
|
||||||
act = (priv->plat->phy_addr == addr);
|
|
||||||
switch (phydev->irq) {
|
|
||||||
case PHY_POLL:
|
|
||||||
irq_str = "POLL";
|
|
||||||
break;
|
|
||||||
case PHY_IGNORE_INTERRUPT:
|
|
||||||
irq_str = "IGNORE";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
sprintf(irq_num, "%d", phydev->irq);
|
|
||||||
irq_str = irq_num;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
phy_attached_info(phydev);
|
phy_attached_info(phydev);
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -874,21 +874,37 @@ void phy_attached_info(struct phy_device *phydev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(phy_attached_info);
|
EXPORT_SYMBOL(phy_attached_info);
|
||||||
|
|
||||||
#define ATTACHED_FMT "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)"
|
#define ATTACHED_FMT "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%s)"
|
||||||
void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
|
void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
const char *drv_name = phydev->drv ? phydev->drv->name : "unbound";
|
const char *drv_name = phydev->drv ? phydev->drv->name : "unbound";
|
||||||
|
char *irq_str;
|
||||||
|
char irq_num[4];
|
||||||
|
|
||||||
|
switch(phydev->irq) {
|
||||||
|
case PHY_POLL:
|
||||||
|
irq_str = "POLL";
|
||||||
|
break;
|
||||||
|
case PHY_IGNORE_INTERRUPT:
|
||||||
|
irq_str = "IGNORE";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
snprintf(irq_num, sizeof(irq_num), "%d", phydev->irq);
|
||||||
|
irq_str = irq_num;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!fmt) {
|
if (!fmt) {
|
||||||
dev_info(&phydev->mdio.dev, ATTACHED_FMT "\n",
|
dev_info(&phydev->mdio.dev, ATTACHED_FMT "\n",
|
||||||
drv_name, phydev_name(phydev),
|
drv_name, phydev_name(phydev),
|
||||||
phydev->irq);
|
irq_str);
|
||||||
} else {
|
} else {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
dev_info(&phydev->mdio.dev, ATTACHED_FMT,
|
dev_info(&phydev->mdio.dev, ATTACHED_FMT,
|
||||||
drv_name, phydev_name(phydev),
|
drv_name, phydev_name(phydev),
|
||||||
phydev->irq);
|
irq_str);
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
vprintk(fmt, ap);
|
vprintk(fmt, ap);
|
||||||
|
|
Loading…
Add table
Reference in a new issue