soc: qcom: aoss: Format string in qmp_send()
authorBjorn Andersson <quic_bjorande@quicinc.com>
Fri, 11 Aug 2023 20:58:38 +0000 (13:58 -0700)
committerBjorn Andersson <andersson@kernel.org>
Mon, 14 Aug 2023 02:27:32 +0000 (19:27 -0700)
commit8873d1e2f88afbe89c99d8f49f88934a2da2991f
tree6d8fe660174a0ab1c7c26662e7315ad77481085b
parent59e09100836fdb618b107c37189d6001b5825872
soc: qcom: aoss: Format string in qmp_send()

The majority of callers to qmp_send() composes the message dynamically
using some form of sprintf(), resulting in unnecessary complication and
stack usage.

By changing the interface of qmp_send() to take a format string and
arguments, the duplicated composition of the commands can be moved to a
single location.

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-4-quic_bjorande@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/qcom_aoss.c
include/linux/soc/qcom/qcom_aoss.h