Merge "msm: ipa: rate limiting the warning"

This commit is contained in:
qctecmdr 2020-09-02 19:47:07 -07:00 • committed by Gerrit - the friendly Code Review server
commit feeb959896

View file

@ -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);