summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-03-23 11:28:30 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:27:51 -0700
commita084980dcbf56c896e4b6c19aff2b082d5db7006 (patch)
tree2bdecde658ff928eff6e0f12ccba63217692d8de /include
parent104e0878984bb467e3f54d61105d8903babb4ec1 (diff)
downloadlinux-a084980dcbf56c896e4b6c19aff2b082d5db7006.tar.gz
linux-a084980dcbf56c896e4b6c19aff2b082d5db7006.tar.bz2
linux-a084980dcbf56c896e4b6c19aff2b082d5db7006.zip
[NET_SCHED]: kill PSCHED_SET_PASTPERFECT/PSCHED_IS_PASTPERFECT
Use direct assignment and comparison instead. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/pkt_sched.h3
-rw-r--r--include/net/red.h4
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;
#define PSCHED_TDIFF(tv1, tv2) (long)((tv1) - (tv2))
#define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \
min_t(long long, (tv1) - (tv2), bound)
-#define PSCHED_SET_PASTPERFECT(t) ((t) = 0)
-#define PSCHED_IS_PASTPERFECT(t) ((t) == 0)
+#define PSCHED_PASTPERFECT 0
struct qdisc_watchdog {
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,
static inline int red_is_idling(struct red_parms *p)
{
- return !PSCHED_IS_PASTPERFECT(p->qidlestart);
+ return p->qidlestart != PSCHED_PASTPERFECT;
}
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)
static inline void red_end_of_idle_period(struct red_parms *p)
{
- PSCHED_SET_PASTPERFECT(p->qidlestart);
+ p->qidlestart = PSCHED_PASTPERFECT;
}
static inline void red_restart(struct red_parms *p)