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

Commit 39d2f49e authored by Sarannya S's avatar Sarannya S Committed by Gerrit - the friendly Code Review server
Browse files

rpmsg: glink: Change error logging to avoid throttling



Avoid printing error when ENODEV is returned from glink callback
and use dev_err_ratelimited so that throttling will not happen
due to excessive logging.

Change-Id: I9369046c2f907ecd38416c8927764c7a8b7c1ca4
Signed-off-by: default avatarSarannya S <sarannya@codeaurora.org>
parent 2a010244
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ do { \
	if (ch->glink) {						     \
		ipc_log_string(ch->glink->ilc, "%s[%d:%d] %s: "x, ch->name,  \
			       ch->lcid, ch->rcid, __func__, ##__VA_ARGS__); \
		dev_err(ch->glink->dev, "[%s]: "x, __func__, ##__VA_ARGS__); \
		dev_err_ratelimited(ch->glink->dev, "[%s]: "x, __func__, ##__VA_ARGS__); \
	}								     \
} while (0)

@@ -1069,7 +1069,7 @@ static int qcom_glink_rx_data(struct qcom_glink *glink, size_t avail)
					channel->ept.priv,
					RPMSG_ADDR_ANY);

			if (ret < 0) {
			if (ret < 0 && ret != -ENODEV) {
				CH_ERR(channel,
					"callback error ret = %d\n", ret);
				ret = 0;