public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] habanalabs: add rate-limit to an error message
@ 2019-06-06 12:20 Oded Gabbay
  2019-06-06 12:20 ` [PATCH 2/2] docs/habanalabs: update text for some entries in sysfs Oded Gabbay
  2019-06-06 18:54 ` [PATCH 1/2] habanalabs: add rate-limit to an error message Joe Perches
  0 siblings, 2 replies; 4+ messages in thread
From: Oded Gabbay @ 2019-06-06 12:20 UTC (permalink / raw)
  To: linux-kernel

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>
---
 drivers/misc/habanalabs/habanalabs_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/habanalabs_ioctl.c b/drivers/misc/habanalabs/habanalabs_ioctl.c
index c5f7ecabef0a..cbc5fa1ffe11 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;
 		}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-07  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 12:20 [PATCH 1/2] habanalabs: add rate-limit to an error message Oded Gabbay
2019-06-06 12:20 ` [PATCH 2/2] docs/habanalabs: update text for some entries in sysfs Oded Gabbay
2019-06-06 18:54 ` [PATCH 1/2] habanalabs: add rate-limit to an error message Joe Perches
2019-06-07  8:08   ` Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox