summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorBjorn Andersson <quic_bjorande@quicinc.com>2023-08-11 13:58:39 -0700
committerBjorn Andersson <andersson@kernel.org>2023-08-13 19:27:32 -0700
commitb4f63bbff96e4510676b1e78b00d14baaee9ad29 (patch)
treefa2355321f9983375b2e085a45e784a8a1135c0a /drivers/remoteproc
parent8873d1e2f88afbe89c99d8f49f88934a2da2991f (diff)
soc: qcom: aoss: Tidy up qmp_send() callers
With qmp_send() handling variable length messages and string formatting he callers of qmp_send() can be cleaned up to not care about these things. Drop the QMP_MSG_LEN sized buffers and use the message formatting, as appropriate. Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Link: https://lore.kernel.org/r/20230811205839.727373-5-quic_bjorande@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/qcom_q6v5.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c
index 8b41a73fa4d1..4ee5e67a9f03 100644
--- a/drivers/remoteproc/qcom_q6v5.c
+++ b/drivers/remoteproc/qcom_q6v5.c
@@ -23,19 +23,13 @@
static int q6v5_load_state_toggle(struct qcom_q6v5 *q6v5, bool enable)
{
- char buf[Q6V5_LOAD_STATE_MSG_LEN];
int ret;
if (!q6v5->qmp)
return 0;
- ret = snprintf(buf, sizeof(buf),
- "{class: image, res: load_state, name: %s, val: %s}",
+ ret = qmp_send(q6v5->qmp, "{class: image, res: load_state, name: %s, val: %s}",
q6v5->load_state, enable ? "on" : "off");
-
- WARN_ON(ret >= Q6V5_LOAD_STATE_MSG_LEN);
-
- ret = qmp_send(q6v5->qmp, buf);
if (ret)
dev_err(q6v5->dev, "failed to toggle load state\n");