From: Oded Gabbay Date: Thu, 6 Jun 2019 06:28:45 +0000 (+0300) Subject: habanalabs: add rate-limit to an error message X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=29a7aad59de25e56c82e6a3a9f8023d2e8a8423a;p=linux.git habanalabs: add rate-limit to an error message This patch changes the print of an error message about mis-configuration of the debug infrastructure to be rate-limited, to prevent flooding of kernel log, as these configuration requests can come at a high rate. Signed-off-by: Oded Gabbay --- diff --git a/drivers/misc/habanalabs/habanalabs_ioctl.c b/drivers/misc/habanalabs/habanalabs_ioctl.c index 678375117f3ba..c641c7eb6f7cb 100644 --- a/drivers/misc/habanalabs/habanalabs_ioctl.c +++ b/drivers/misc/habanalabs/habanalabs_ioctl.c @@ -255,7 +255,7 @@ static int hl_debug_ioctl(struct hl_fpriv *hpriv, void *data) case HL_DEBUG_OP_SPMU: case HL_DEBUG_OP_TIMESTAMP: if (!hdev->in_debug) { - dev_err(hdev->dev, + dev_err_ratelimited(hdev->dev, "Rejecting debug configuration request because device not in debug mode\n"); return -EFAULT; }