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

Commit c999c696 authored by Michael Adisumarta's avatar Michael Adisumarta
Browse files

msm: ipa: rate limiting the warning



Rate limitting the warning if client doesn't have
callback.

Change-Id: I09b02181e4c34ecf342e150de76eace9341a0c0a
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 13c8f5ce
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -35,6 +35,15 @@
		IPA_IPC_LOGGING(ipa3_get_ipc_logbuf_low(), \
			IPA_PM_DRV_NAME " %s:%d " fmt, ## args); \
	} while (0)
#define IPA_PM_ERR_RL(fmt, args...) \
	do { \
		pr_err_ratelimited_ipa(IPA_PM_DRV_NAME " %s:%d " fmt, \
			__func__, __LINE__, ## args); \
		IPA_IPC_LOGGING(ipa3_get_ipc_logbuf(), \
			IPA_PM_DRV_NAME " %s:%d " fmt, ## args); \
		IPA_IPC_LOGGING(ipa3_get_ipc_logbuf_low(), \
			IPA_PM_DRV_NAME " %s:%d " fmt, ## args); \
	} while (0)
#define IPA_PM_DBG_STATE(hdl, name, state) \
	IPA_PM_DBG_LOW("Client[%d] %s: %s\n", hdl, name, \
		client_state_to_str[state])
@@ -435,8 +444,8 @@ static void activate_work_func(struct work_struct *work)
		client->callback(client->callback_params,
			IPA_PM_CLIENT_ACTIVATED);
	} else {
		IPA_PM_ERR("client has no callback");
		WARN_ON(1);
		IPA_PM_ERR_RL("client has no callback");
		WARN_ON_RATELIMIT_IPA(1);
	}
	mutex_unlock(&ipa_pm_ctx->client_mutex);