Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111442
b: refs/heads/master
c: 5337407
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and David S. Miller committed Sep 8, 2008
1 parent 5585894 commit 4f56211
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bff9dbd00e5907f5c36e72bae8aee8a46440e11
refs/heads/master: 5337407c673e2c7c66a84b9838d55a45a760ecff
10 changes: 10 additions & 0 deletions trunk/include/asm-generic/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ extern void warn_slowpath(const char *file, const int line,
unlikely(__ret_warn_once); \
})

#define WARN_ONCE(condition, format...) ({ \
static int __warned; \
int __ret_warn_once = !!(condition); \
\
if (unlikely(__ret_warn_once)) \
if (WARN(!__warned, format)) \
__warned = 1; \
unlikely(__ret_warn_once); \
})

#define WARN_ON_RATELIMIT(condition, state) \
WARN_ON((condition) && __ratelimit(state))

Expand Down
3 changes: 1 addition & 2 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,9 @@ static void dev_watchdog(unsigned long arg)
time_after(jiffies, (dev->trans_start +
dev->watchdog_timeo))) {
char drivername[64];
printk(KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n",
WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit timed out\n",
dev->name, netdev_drivername(dev, drivername, 64));
dev->tx_timeout(dev);
WARN_ON_ONCE(1);
}
if (!mod_timer(&dev->watchdog_timer,
round_jiffies(jiffies +
Expand Down

0 comments on commit 4f56211

Please sign in to comment.