netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: [NET_SCHED]: sch_hfsc: replace ASSERT macro by WARN_ON
Date: Tue, 13 Feb 2007 16:20:07 +0100	[thread overview]
Message-ID: <45D1D727.8010401@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1548 bytes --]

[NET_SCHED]: sch_hfsc: replace ASSERT macro by WARN_ON

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit ee0d5b5b1a2f81dabd5189c6ac960e7cab40d8ff
tree 6975f4ea578fb1e86f8d9c7607fa08ec3a8c841f
parent 6e1d9d04c4004361fb327abcbde74a20e8dca2ff
author Patrick McHardy <kaber@trash.net> Tue, 13 Feb 2007 16:15:12 +0100
committer Patrick McHardy <kaber@trash.net> Tue, 13 Feb 2007 16:15:12 +0100

 net/sched/sch_hfsc.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 135087d..396deb7 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -71,8 +71,6 @@ #include <net/pkt_cls.h>
 #include <asm/system.h>
 #include <asm/div64.h>
 
-#define HFSC_DEBUG 1
-
 /*
  * kernel internal service curve representation:
  *   coordinates are given by 64 bit unsigned integers.
@@ -211,17 +209,6 @@ do {									\
 } while (0)
 #endif
 
-#if HFSC_DEBUG
-#define ASSERT(cond)							\
-do {									\
-	if (unlikely(!(cond)))						\
-		printk("assertion %s failed at %s:%i (%s)\n",		\
-		       #cond, __FILE__, __LINE__, __FUNCTION__);	\
-} while (0)
-#else
-#define ASSERT(cond)
-#endif /* HFSC_DEBUG */
-
 #define	HT_INFINITY	0xffffffffffffffffULL	/* infinite time value */
 
 
@@ -1492,7 +1479,7 @@ hfsc_schedule_watchdog(struct Qdisc *sch
 		if (next_time == 0 || next_time > q->root.cl_cfmin)
 			next_time = q->root.cl_cfmin;
 	}
-	ASSERT(next_time != 0);
+	WARN_ON(next_time == 0);
 	delay = next_time - cur_time;
 	delay = PSCHED_US2JIFFIE(delay);
 

             reply	other threads:[~2007-02-13 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-13 15:20 Patrick McHardy [this message]
2007-02-13 20:37 ` [NET_SCHED]: sch_hfsc: replace ASSERT macro by WARN_ON David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45D1D727.8010401@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).