From: Francois Romieu Date: Wed, 16 Nov 2005 22:44:05 +0000 (+0100) Subject: r8169: fix printk_ratelimit in the interrupt handler X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c8b2eb4c71d5c3d45dbfe0c81fefe81e264e9b3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git r8169: fix printk_ratelimit in the interrupt handler I keep on getting "printk: N messages suppressed" messages. We need to test netif_msg_intr() _before_ running printk_ratelimit(), because the latter updates state. Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Francois Romieu --- diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 159b56a56ef4..bda6095f3120 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2516,7 +2516,7 @@ rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs) } while (boguscnt > 0); if (boguscnt <= 0) { - if (net_ratelimit() && netif_msg_intr(tp)) { + if (netif_msg_intr(tp) && net_ratelimit() ) { printk(KERN_WARNING "%s: Too much work at interrupt!\n", dev->name); }