diff options
| author | Katish Paran <kparan@codeaurora.org> | 2015-09-29 17:58:13 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:03:58 -0700 |
| commit | fb64289cf4c6d4af4f7c3cf05e2057a01dfc0f78 (patch) | |
| tree | bebf5340272fbd95229ea21e28b826736915404a | |
| parent | aa06bbb30e62cd770756c9dc2da758a75962dde0 (diff) | |
diag: Rate limit the error logs
This patch rate limit few of the error logs to avoid flooding
of kernel logs.
Change-Id: I11843becf1d3ae97d5e433198ae27afd0237ed82
Signed-off-by: Katish Paran <kparan@codeaurora.org>
| -rw-r--r-- | drivers/char/diag/diagchar_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/diag/diagchar_core.c b/drivers/char/diag/diagchar_core.c index d38a0f3fdaa2..3b092b861fe7 100644 --- a/drivers/char/diag/diagchar_core.c +++ b/drivers/char/diag/diagchar_core.c @@ -337,8 +337,8 @@ static int diagchar_open(struct inode *inode, struct file *file) diag_add_client(i, file); } else { mutex_unlock(&driver->diagchar_mutex); - pr_alert("Max client limit for DIAG reached\n"); - pr_info("Cannot open handle %s" + pr_err_ratelimited("diag: Max client limit for DIAG reached\n"); + pr_err_ratelimited("diag: Cannot open handle %s" " %d", current->comm, current->tgid); for (i = 0; i < driver->num_clients; i++) pr_debug("%d) %s PID=%d", i, driver-> @@ -365,7 +365,7 @@ static int diagchar_open(struct inode *inode, struct file *file) fail: mutex_unlock(&driver->diagchar_mutex); driver->num_clients--; - pr_alert("diag: Insufficient memory for new client"); + pr_err_ratelimited("diag: Insufficient memory for new client"); return -ENOMEM; } |
