aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 3cc2714fd5ae..5197b6caaf2d 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -434,8 +434,8 @@ m2sm(u32 m)
434 u64 sm; 434 u64 sm;
435 435
436 sm = ((u64)m << SM_SHIFT); 436 sm = ((u64)m << SM_SHIFT);
437 sm += PSCHED_JIFFIE2US(HZ) - 1; 437 sm += PSCHED_TICKS_PER_SEC - 1;
438 do_div(sm, PSCHED_JIFFIE2US(HZ)); 438 do_div(sm, PSCHED_TICKS_PER_SEC);
439 return sm; 439 return sm;
440} 440}
441 441
@@ -448,7 +448,7 @@ m2ism(u32 m)
448 if (m == 0) 448 if (m == 0)
449 ism = HT_INFINITY; 449 ism = HT_INFINITY;
450 else { 450 else {
451 ism = ((u64)PSCHED_JIFFIE2US(HZ) << ISM_SHIFT); 451 ism = ((u64)PSCHED_TICKS_PER_SEC << ISM_SHIFT);
452 ism += m - 1; 452 ism += m - 1;
453 do_div(ism, m); 453 do_div(ism, m);
454 } 454 }
@@ -461,7 +461,7 @@ d2dx(u32 d)
461{ 461{
462 u64 dx; 462 u64 dx;
463 463
464 dx = ((u64)d * PSCHED_JIFFIE2US(HZ)); 464 dx = ((u64)d * PSCHED_TICKS_PER_SEC);
465 dx += USEC_PER_SEC - 1; 465 dx += USEC_PER_SEC - 1;
466 do_div(dx, USEC_PER_SEC); 466 do_div(dx, USEC_PER_SEC);
467 return dx; 467 return dx;
@@ -473,7 +473,7 @@ sm2m(u64 sm)
473{ 473{
474 u64 m; 474 u64 m;
475 475
476 m = (sm * PSCHED_JIFFIE2US(HZ)) >> SM_SHIFT; 476 m = (sm * PSCHED_TICKS_PER_SEC) >> SM_SHIFT;
477 return (u32)m; 477 return (u32)m;
478} 478}
479 479
@@ -484,7 +484,7 @@ dx2d(u64 dx)
484 u64 d; 484 u64 d;
485 485
486 d = dx * USEC_PER_SEC; 486 d = dx * USEC_PER_SEC;
487 do_div(d, PSCHED_JIFFIE2US(HZ)); 487 do_div(d, PSCHED_TICKS_PER_SEC);
488 return (u32)d; 488 return (u32)d;
489} 489}
490 490