gpiolib: emit a debug message when adding events to a full kfifo
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 29 Nov 2019 10:22:18 +0000 (11:22 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 12 Feb 2020 11:05:47 +0000 (12:05 +0100)
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

index 43d98309e725691e767a6698954bb56144bd3d4c..36afe0b2b15002c6fe51ecd252315d794a660940 100644 (file)
@@ -978,6 +978,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;
 }