From e1e0ca3b09b739910a94dfb79b612b2bd7b0d682 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 12 Nov 2018 11:54:51 -0600 Subject: [PATCH 1/2] ASoC: SOF: ipc: fix use of 'complete' Use ipc_complete to make it non-ambiguous and move to u32 to avoid checkpatch warning on boolean usage in structures https://lkml.org/lkml/2017/11/21/384 Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/ipc.c | 6 +++--- sound/soc/sof/sof-priv.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index fa95209ce64715..8850e0605c26e2 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -218,7 +218,7 @@ static int tx_wait_done(struct snd_sof_ipc *ipc, struct snd_sof_ipc_msg *msg, int ret; /* wait for DSP IPC completion */ - ret = wait_event_timeout(msg->waitq, msg->complete, + ret = wait_event_timeout(msg->waitq, msg->ipc_complete, msecs_to_jiffies(IPC_TIMEOUT_MSECS)); spin_lock_irqsave(&sdev->ipc_lock, flags); @@ -275,7 +275,7 @@ int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header, msg->header = header; msg->msg_size = msg_bytes; msg->reply_size = reply_bytes; - msg->complete = false; + msg->ipc_complete = false; /* attach any data */ if (msg_bytes) @@ -347,7 +347,7 @@ static struct snd_sof_ipc_msg *sof_ipc_reply_find_msg(struct snd_sof_ipc *ipc, static void sof_ipc_tx_msg_reply_complete(struct snd_sof_ipc *ipc, struct snd_sof_ipc_msg *msg) { - msg->complete = true; + msg->ipc_complete = true; wake_up(&msg->waitq); } diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 531fed526c5a2f..0eefe9e7961e08 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -229,7 +229,7 @@ struct snd_sof_ipc_msg { size_t reply_size; wait_queue_head_t waitq; - bool complete; + u32 ipc_complete; }; /* PCM stream, mapped to FW component */ From 37684366d674fd47ac483a5bd6d951917ccdfe49 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 12 Nov 2018 11:57:52 -0600 Subject: [PATCH 2/2] ASoC: SOF: remove boolean use in structures Make checkpatch happy https://lkml.org/lkml/2017/11/21/384 Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda.h | 2 +- sound/soc/sof/ipc.c | 2 +- sound/soc/sof/sof-priv.h | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index cfe88ecd44778c..a1a525376d760f 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -371,7 +371,7 @@ struct sof_intel_hda_dev { struct hdac_ext_stream *dtrace_stream; /* if position update IPC needed */ - bool no_ipc_position; + u32 no_ipc_position; int irq; diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index 8850e0605c26e2..02ca677ad22ed2 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -54,7 +54,7 @@ struct snd_sof_ipc { /* TX message work and status */ wait_queue_head_t wait_txq; struct work_struct tx_kwork; - bool msg_pending; + u32 msg_pending; /* Rx Message work and status */ struct work_struct rx_kwork; diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 0eefe9e7961e08..d5f386e81eef46 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -317,7 +317,7 @@ struct snd_sof_dev { /* DSP firmware boot */ wait_queue_head_t boot_wait; - bool boot_complete; + u32 boot_complete; /* DSP HW differentiation */ struct snd_sof_pdata *pdata; @@ -377,12 +377,12 @@ struct snd_sof_dev { int dma_trace_pages; wait_queue_head_t trace_sleep; u32 host_offset; - bool dtrace_is_enabled; - bool dtrace_error; + u32 dtrace_is_enabled; + u32 dtrace_error; /* PM */ - bool restore_kcontrols; /* restore kcontrols upon resume */ - bool first_boot; + u32 restore_kcontrols; /* restore kcontrols upon resume */ + u32 first_boot; void *private; /* core does not touch this */ };