diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/pkt_sched.h | 3 | ||||
-rw-r--r-- | include/net/red.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 49325ffb00b1..c40147a60205 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -54,8 +54,7 @@ typedef long psched_tdiff_t; | |||
54 | #define PSCHED_TDIFF(tv1, tv2) (long)((tv1) - (tv2)) | 54 | #define PSCHED_TDIFF(tv1, tv2) (long)((tv1) - (tv2)) |
55 | #define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \ | 55 | #define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \ |
56 | min_t(long long, (tv1) - (tv2), bound) | 56 | min_t(long long, (tv1) - (tv2), bound) |
57 | #define PSCHED_SET_PASTPERFECT(t) ((t) = 0) | 57 | #define PSCHED_PASTPERFECT 0 |
58 | #define PSCHED_IS_PASTPERFECT(t) ((t) == 0) | ||
59 | 58 | ||
60 | struct qdisc_watchdog { | 59 | struct qdisc_watchdog { |
61 | struct hrtimer timer; | 60 | struct hrtimer timer; |
diff --git a/include/net/red.h b/include/net/red.h index a4eb37946f2c..d9e1149a2bca 100644 --- a/include/net/red.h +++ b/include/net/red.h | |||
@@ -151,7 +151,7 @@ static inline void red_set_parms(struct red_parms *p, | |||
151 | 151 | ||
152 | static inline int red_is_idling(struct red_parms *p) | 152 | static inline int red_is_idling(struct red_parms *p) |
153 | { | 153 | { |
154 | return !PSCHED_IS_PASTPERFECT(p->qidlestart); | 154 | return p->qidlestart != PSCHED_PASTPERFECT; |
155 | } | 155 | } |
156 | 156 | ||
157 | static inline void red_start_of_idle_period(struct red_parms *p) | 157 | static inline void red_start_of_idle_period(struct red_parms *p) |
@@ -161,7 +161,7 @@ static inline void red_start_of_idle_period(struct red_parms *p) | |||
161 | 161 | ||
162 | static inline void red_end_of_idle_period(struct red_parms *p) | 162 | static inline void red_end_of_idle_period(struct red_parms *p) |
163 | { | 163 | { |
164 | PSCHED_SET_PASTPERFECT(p->qidlestart); | 164 | p->qidlestart = PSCHED_PASTPERFECT; |
165 | } | 165 | } |
166 | 166 | ||
167 | static inline void red_restart(struct red_parms *p) | 167 | static inline void red_restart(struct red_parms *p) |