Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: ipc: Add no reply inline calls

95% of the calls inside SOF to TX an IPC don't care about a reply. Yet
the previous commit cleaned up a bunch of replies that were being
populated and then thrown away. This adds some functions so users who do
not need replies don't feel obligated to provide the space to the API.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20230419194057.42205-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Curtis Malainey and committed by
Mark Brown
ccb541a0 09cda705

+14
+4
sound/soc/sof/sof-client.h
··· 39 39 40 40 int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg, 41 41 void *reply_data, size_t reply_bytes); 42 + static inline int sof_client_ipc_tx_message_no_reply(struct sof_client_dev *cdev, void *ipc_msg) 43 + { 44 + return sof_client_ipc_tx_message(cdev, ipc_msg, NULL, 0); 45 + } 42 46 int sof_client_ipc_set_get_data(struct sof_client_dev *cdev, void *ipc_msg, 43 47 bool set); 44 48
+10
sound/soc/sof/sof-priv.h
··· 711 711 } 712 712 int sof_ipc_tx_message(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes, 713 713 void *reply_data, size_t reply_bytes); 714 + static inline int sof_ipc_tx_message_no_reply(struct snd_sof_ipc *ipc, void *msg_data, 715 + size_t msg_bytes) 716 + { 717 + return sof_ipc_tx_message(ipc, msg_data, msg_bytes, NULL, 0); 718 + } 714 719 int sof_ipc_set_get_data(struct snd_sof_ipc *ipc, void *msg_data, 715 720 size_t msg_bytes, bool set); 716 721 int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes, 717 722 void *reply_data, size_t reply_bytes); 723 + static inline int sof_ipc_tx_message_no_pm_no_reply(struct snd_sof_ipc *ipc, void *msg_data, 724 + size_t msg_bytes) 725 + { 726 + return sof_ipc_tx_message_no_pm(ipc, msg_data, msg_bytes, NULL, 0); 727 + } 718 728 int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes, 719 729 size_t reply_bytes); 720 730