asoc: codecs: Replace dev_err/info with ratelimit prints

replace all dev(pr)_err/info logs
that could potentially flood kernel logs with
ratelimit functions dev_err_ratelimited and
dev_info_ratelimited

Change-Id: I32dc6002dead1a07622978c4de63d541c01982fd
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
Cette révision appartient à :
Shazmaan Ali
2022-03-22 11:26:47 -07:00
Parent aa3950aed3
révision a20e11e0c3
27 fichiers modifiés avec 600 ajouts et 569 suppressions

Voir le fichier

@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/module.h>
@@ -119,7 +120,7 @@ static ssize_t wcd938x_swrslave_reg_show(struct swr_device *pdev,
if (((total + len) >= count - 1) || (len < 0))
break;
if (copy_to_user((ubuf + total), tmp_buf, len)) {
pr_err("%s: fail to copy reg dump\n", __func__);
pr_err_ratelimited("%s: fail to copy reg dump\n", __func__);
total = -EFAULT;
goto copy_err;
}
@@ -216,7 +217,7 @@ static ssize_t codec_debug_peek_write(struct file *file,
if (rc == 0)
rc = cnt;
else
pr_err("%s: rc = %d\n", __func__, rc);
pr_err_ratelimited("%s: rc = %d\n", __func__, rc);
return rc;
}
@@ -252,7 +253,7 @@ static ssize_t codec_debug_write(struct file *file,
if (rc == 0)
rc = cnt;
else
pr_err("%s: rc = %d\n", __func__, rc);
pr_err_ratelimited("%s: rc = %d\n", __func__, rc);
return rc;
}
@@ -283,7 +284,7 @@ static int wcd938x_slave_bind(struct device *dev,
int retry = SWR_MAX_RETRY;
if (!pdev) {
pr_err("%s: invalid swr device handle\n", __func__);
pr_err_ratelimited("%s: invalid swr device handle\n", __func__);
return -EINVAL;
}
@@ -313,7 +314,7 @@ static void wcd938x_slave_unbind(struct device *dev,
wcd938x_slave = swr_get_dev_data(pdev);
if (!wcd938x_slave) {
dev_err(&pdev->dev, "%s: wcd938x_slave is NULL\n", __func__);
dev_err_ratelimited(&pdev->dev, "%s: wcd938x_slave is NULL\n", __func__);
return;
}
}