Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63187e0a authored by Katish Paran's avatar Katish Paran Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarKatish Paran <kparan@codeaurora.org>
parent ee833ce5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
}