aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-01-08 22:12:03 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-09 14:16:05 -0800
commit538e43a4bd36ae49873ef7097a16a207f5d9912b (patch)
tree11a7a9ea4594993c559a247d6ff373dc00b77e1c /net/sched/sch_hfsc.c
parent2941a4863154982918d39a639632c76eeacfa884 (diff)
downloadkernel_samsung_aries-538e43a4bd36ae49873ef7097a16a207f5d9912b.zip
kernel_samsung_aries-538e43a4bd36ae49873ef7097a16a207f5d9912b.tar.gz
kernel_samsung_aries-538e43a4bd36ae49873ef7097a16a207f5d9912b.tar.bz2
[PKT_SCHED]: Use USEC_PER_SEC
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index c26764b..cad1758 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -208,7 +208,7 @@ struct hfsc_sched
do { \
struct timeval tv; \
do_gettimeofday(&tv); \
- (stamp) = 1000000ULL * tv.tv_sec + tv.tv_usec; \
+ (stamp) = 1ULL * USEC_PER_SEC * tv.tv_sec + tv.tv_usec; \
} while (0)
#endif
@@ -502,8 +502,8 @@ d2dx(u32 d)
u64 dx;
dx = ((u64)d * PSCHED_JIFFIE2US(HZ));
- dx += 1000000 - 1;
- do_div(dx, 1000000);
+ dx += USEC_PER_SEC - 1;
+ do_div(dx, USEC_PER_SEC);
return dx;
}
@@ -523,7 +523,7 @@ dx2d(u64 dx)
{
u64 d;
- d = dx * 1000000;
+ d = dx * USEC_PER_SEC;
do_div(d, PSCHED_JIFFIE2US(HZ));
return (u32)d;
}