diff mbox series

[RESEND,v5,4/7] gpiolib: emit a debug message when adding events to a full kfifo

Message ID 20200123140506.29275-5-brgl@bgdev.pl
State Superseded
Headers show
Series [RESEND,v5,1/7] kfifo: provide noirqsave variants of spinlocked in and out helpers | expand

Commit Message

Bartosz Golaszewski Jan. 23, 2020, 2:05 p.m. UTC
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Currently if the line-event kfifo is full, we just silently drop any new
events. Add a ratelimited debug message so that we at least have some
trace in the kernel log of event overflow.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpiolib.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 43c96e7cdc48..6b5d102dfb13 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -987,6 +987,8 @@  static irqreturn_t lineevent_irq_thread(int irq, void *p)
 					    1, &le->wait.lock);
 	if (ret)
 		wake_up_poll(&le->wait, EPOLLIN);
+	else
+		pr_debug_ratelimited("event FIFO is full - event dropped\n");
 
 	return IRQ_HANDLED;
 }