regulator: qti-ocp-notifier: rate limit OCP and alarm notification logging
Use pr_err_ratelimited() for regulator OCP and alarm notification logging to avoid a system slowdown and watchdog timeout if a continuous fault condition occurs that results in many repeated notification events. Change-Id: I13c3248696b4a2461bfe097a554b257a0fe63d4f Signed-off-by: David Collins <quic_collinsd@quicinc.com>
This commit is contained in:
parent
ff476fbace
commit
af3266829e
@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. */
|
||||
/* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved. */
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/idr.h>
|
||||
@ -107,12 +107,12 @@ static int ocp_notifier_log_event(struct ocp_notifier_dev *ocp_dev,
|
||||
return ret;
|
||||
|
||||
if (name) {
|
||||
pr_err("%s name=%s, ppid=0x%03X, mode=%u\n",
|
||||
pr_err_ratelimited("%s name=%s, ppid=0x%03X, mode=%u\n",
|
||||
label, name, entry->ppid, entry->mode_at_ocp);
|
||||
ipc_log_string(log_info->ipc_log, "%s name=%s, ppid=0x%03X, mode=%u\n",
|
||||
label, name, entry->ppid, entry->mode_at_ocp);
|
||||
} else {
|
||||
pr_err("%s ppid=0x%03X, mode=%u\n",
|
||||
pr_err_ratelimited("%s ppid=0x%03X, mode=%u\n",
|
||||
label, entry->ppid, entry->mode_at_ocp);
|
||||
ipc_log_string(log_info->ipc_log, "%s ppid=0x%03X, mode=%u\n",
|
||||
label, entry->ppid, entry->mode_at_ocp);
|
||||
|
Loading…
Reference in New Issue
Block a user