wan: dscc4: use msecs_to_jiffies for conversions
API compliance scanning with coccinelle flagged: ./drivers/net/wan/dscc4.c:1036:1-33: WARNING: timeout (10) seems HZ dependent ./drivers/net/wan/dscc4.c:554:2-34: WARNING: timeout (10) seems HZ dependent ./drivers/net/wan/dscc4.c:599:2-34: WARNING: timeout (10) seems HZ dependent Numeric constants passed to schedule_timeout_*() make the effective timeout HZ dependent which does not seem to be the intent here. Fixed up by converting the constant to jiffies with msecs_to_jiffies(), passing 100ms (assuming HZ==100 in the original code). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fb79c066bc
commit
cbab1510af
1 changed files with 3 additions and 3 deletions
|
@ -551,7 +551,7 @@ static int dscc4_wait_ack_cec(struct dscc4_dev_priv *dpriv,
|
||||||
msg, i);
|
msg, i);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
schedule_timeout_uninterruptible(10);
|
schedule_timeout_uninterruptible(msecs_to_jiffies(100));
|
||||||
rmb();
|
rmb();
|
||||||
} while (++i > 0);
|
} while (++i > 0);
|
||||||
netdev_err(dev, "%s timeout\n", msg);
|
netdev_err(dev, "%s timeout\n", msg);
|
||||||
|
@ -596,7 +596,7 @@ static inline int dscc4_xpr_ack(struct dscc4_dev_priv *dpriv)
|
||||||
(dpriv->iqtx[cur] & cpu_to_le32(Xpr)))
|
(dpriv->iqtx[cur] & cpu_to_le32(Xpr)))
|
||||||
break;
|
break;
|
||||||
smp_rmb();
|
smp_rmb();
|
||||||
schedule_timeout_uninterruptible(10);
|
schedule_timeout_uninterruptible(msecs_to_jiffies(100));
|
||||||
} while (++i > 0);
|
} while (++i > 0);
|
||||||
|
|
||||||
return (i >= 0 ) ? i : -EAGAIN;
|
return (i >= 0 ) ? i : -EAGAIN;
|
||||||
|
@ -1033,7 +1033,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr)
|
||||||
/* Flush posted writes */
|
/* Flush posted writes */
|
||||||
readl(ioaddr + GSTAR);
|
readl(ioaddr + GSTAR);
|
||||||
|
|
||||||
schedule_timeout_uninterruptible(10);
|
schedule_timeout_uninterruptible(msecs_to_jiffies(100));
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]);
|
pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]);
|
||||||
|
|
Loading…
Reference in a new issue