summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-06-06 09:28:45 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2019-06-06 09:28:45 +0300
commit29a7aad59de25e56c82e6a3a9f8023d2e8a8423a (patch)
treefebbb0a6fcccfe529bb60e4a5e55a411923e0961 /drivers/misc/habanalabs
parent56e53806dc9eb9acdb914f59708ce1d815f3f86c (diff)
downloadlinux-29a7aad59de25e56c82e6a3a9f8023d2e8a8423a.tar.bz2
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 <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs')
-rw-r--r--drivers/misc/habanalabs/habanalabs_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/habanalabs_ioctl.c b/drivers/misc/habanalabs/habanalabs_ioctl.c
index 678375117f3b..c641c7eb6f7c 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;
}