ASoC: SOF: ipc: Drop header parameter from sof_ipc_tx_message_unlocked()
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fri, 28 Jan 2022 13:36:19 +0000 (15:36 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 28 Jan 2022 15:59:38 +0000 (15:59 +0000)
commit73a548bd1fa3cbe5d18026230a34c1f058257536
treef7123c61babb428abd633505155cf865478f6f7f
parent5b6988fe844a298263821beef5fcc41286a048dc
ASoC: SOF: ipc: Drop header parameter from sof_ipc_tx_message_unlocked()

The snd_sof_ipc_msg.header is not used by platform code, there is no need
to update it and the 'header' parameter for sof_ipc_tx_message_unlocked()
can be dropped at the same time.

Instead of using the header parameter passed by the caller (which does by
setting it to the hdr->cmd) use the hdr->cmd directly when logging.

At the same time make sure that there is a message passed to the tx_message
function.
All instances of the tx_message passes an IPC message, this check is placed
to make sure the future users can not introduce bugs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220128133620.9411-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c