projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87f03cc
)
micrel: Use time_before_eq()
author
Manuel Schölling
<
[email protected]
>
Thu, 22 May 2014 17:52:45 +0000
(19:52 +0200)
committer
David S. Miller
<
[email protected]
>
Thu, 22 May 2014 19:50:12 +0000
(15:50 -0400)
To be future-proof and for better readability the time comparisons are modified
to use time_before_eq() instead of plain, error-prone math.
Signed-off-by: Manuel Schölling <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/micrel/ksz884x.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/micrel/ksz884x.c
b/drivers/net/ethernet/micrel/ksz884x.c
index c3898d3deffb7d42bbbbd52bdf56986da37ab905..064a48d0c368a267826e2f77bacb2da9fa366e1e 100644
(file)
--- a/
drivers/net/ethernet/micrel/ksz884x.c
+++ b/
drivers/net/ethernet/micrel/ksz884x.c
@@
-4930,7
+4930,7
@@
static void netdev_tx_timeout(struct net_device *dev)
* Only reset the hardware if time between calls is long
* enough.
*/
- if (
jiffies - last_reset <= dev->watchdog_timeo
)
+ if (
time_before_eq(jiffies, last_reset + dev->watchdog_timeo)
)
hw_priv = NULL;
}